Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Exporting an OSGi Application Project
Exporting an OSGi Application Project [message #1105844] Tue, 10 September 2013 10:55 Go to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Hi,

just tried to export my very rudimentary application and was a bit surprised not to find a native launcher (in my case an .exe file) within the exported zip file.

I exported it from the product file editor (although the feature didn't work, but I don't care for the moment and used the plugin-based export).

The .ini files are there, so I guess I', missing something.

Any hints?

Thanks in advance,
Daniel
Re: Exporting an OSGi Application Project [message #1105850 is a reply to message #1105844] Tue, 10 September 2013 11:02 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
The problem with the native launcher is that on OS-X it stalls the
system because it occupies the event loop, hence the flag is not set in
the .product file.

I'd suggest you use the generated maven poms then you can also run the
build in a headless fashion.

Tom

On 10.09.13 12:55, Daniel Zimmermann wrote:
> Hi,
>
> just tried to export my very rudimentary application and was a bit
> surprised not to find a native launcher (in my case an .exe file) within
> the exported zip file.
>
> I exported it from the product file editor (although the feature didn't
> work, but I don't care for the moment and used the plugin-based export).
>
> The .ini files are there, so I guess I', missing something.
>
> Any hints?
>
> Thanks in advance,
> Daniel
Re: Exporting an OSGi Application Project [message #1105851 is a reply to message #1105850] Tue, 10 September 2013 11:02 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
oh and launching it on the command line is trivial as well:

java -jar plugins/org.eclipse.equinox.launcher_...jar will launch the
application.

Tom

On 10.09.13 13:02, Tom Schindl wrote:
> The problem with the native launcher is that on OS-X it stalls the
> system because it occupies the event loop, hence the flag is not set in
> the .product file.
>
> I'd suggest you use the generated maven poms then you can also run the
> build in a headless fashion.
>
> Tom
>
> On 10.09.13 12:55, Daniel Zimmermann wrote:
>> Hi,
>>
>> just tried to export my very rudimentary application and was a bit
>> surprised not to find a native launcher (in my case an .exe file) within
>> the exported zip file.
>>
>> I exported it from the product file editor (although the feature didn't
>> work, but I don't care for the moment and used the plugin-based export).
>>
>> The .ini files are there, so I guess I', missing something.
>>
>> Any hints?
>>
>> Thanks in advance,
>> Daniel
>
Re: Exporting an OSGi Application Project [message #1105878 is a reply to message #1105851] Tue, 10 September 2013 11:45 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Thank you for both tipps. I could have thought of the java -jar... thing by myself. As far as I remember it is only necessary for "default" applications when using SWT, correct?
Anyway: I'll follow your suggestion and will doe the Maven thing later - this export was really "just-for-fun"!

Thank you very much for your help, Tom!

Greetings,
Daniel
Re: Exporting an OSGi Application Project [message #1105888 is a reply to message #1105878] Tue, 10 September 2013 11:52 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
You mean the .exe generation? Well it bootstraps java and in shows e.g.
the initial splash.bmp

The maven build has the advantage that it will generate:
a) a setup.exe
b) package the jre with your application

makeing it read to get deployed to app-stores (if you run it on OS-X you
'll get a dmg package which you can put into the Mac App Store)

Tom

On 10.09.13 13:45, Daniel Zimmermann wrote:
> Thank you for both tipps. I could have thought of the java -jar... thing
> by myself. As far as I remember it is only necessary for "default"
> applications when using SWT, correct?
> Anyway: I'll follow your suggestion and will doe the Maven thing later -
> this export was really "just-for-fun"!
>
> Thank you very much for your help, Tom!
>
> Greetings,
> Daniel
Re: Exporting an OSGi Application Project [message #1106032 is a reply to message #1105888] Tue, 10 September 2013 15:34 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
That's nice indeed! Don't ask why, but my Maven knowlegde is tending against zero (never realy needed it). But I have some colleagues that are quite fit in it, so no questions about that topic from my site (for now Razz ).

Thank you again and keep up the good work!

Daniel
Re: Exporting an OSGi Application Project [message #1106708 is a reply to message #1106032] Wed, 11 September 2013 12:40 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Out of pure curiosity: Is an export via the product file even possible?

I ask this, because I just tried it again and while the export itself was successfull, I could not start the application.
I have checked the native laucher artifacts (otherwise no org.eclipse.equinox.launcher would be present in the plugins dir), the product is based on plugins (for now) and the dependencies seems to be solved. I left the start levels in the product as there where in the begining (maybe I should adjust that).
The export is synched, p2 repo is checked as well as allow binary cycles.

When I try to start the app via the launcher I receive the following exception:
java.lang.ClassNotFoundException: my_package.platform.app.MainApplication cannot be found by my_package.platform.app_0.0.0.201309111437


That rises my eyebrows and leaves only question marks in my face...
Re: Exporting an OSGi Application Project [message #1107521 is a reply to message #1106708] Thu, 12 September 2013 14:27 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Just to keep you updated: Short time after writing the last post I checked the plugin jars.
The exception was quite sensible in one way: There was no - and to be precise: not a single - class file within the jars... Interessting.
Re: Exporting an OSGi Application Project [message #1114893 is a reply to message #1107521] Mon, 23 September 2013 11:16 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Hi Tom,

Today I started to dig into the problem of the export again. I don't know, why it didn't occur to me earlier, but I checked the zip file with the logs today and was surprised by the errors I read there

ERROR in C:\Users\dzimmermann\git\standalone_container\my.platform.service\src\my\platform\interfaces\UITabComponent.java (at line 3)
	import javafx.scene.control.Tab;
	       ^^^^^^
The import javafx cannot be resolved


Other errors (in other bundles, but most likly a consequnece of this one are for example)
1. ERROR in C:\Users\dzimmermann\git\standalone_container\my.platform.app\src\my\platform\app\util\Utils.java (at line 0)
	package my.platform.app.util;
	^
The type javafx.stage.Stage cannot be resolved. It is indirectly referenced from required .class files

or
ERROR in C:\Users\dzimmermann\git\standalone_container\my.devhandler\src\my\devhandler\ui\DevicesController.java (at line 53)
	public class DevicesController implements Initializable {
	                                          ^^^^^^^^^^^^^
Initializable cannot be resolved to a type


And so on and so forth...

Tom: Do you know, what the problem could be? And to ask the question you might have: No, I'm still not using Maven for the export...

Regards,
Daniel

PS: Without knowing to much about Maven, I tried to update all the bundles pom files (added the parent-element that points to the releng-pom, added all bundles to the releng's modules list) and re-run it which caused the following error (which I'm absolutly uncertain about how to solve it):
[INFO] {osgi.ws=noenv, osgi.os=noenv, osgi.arch=noenv, org.eclipse.update.install.features=true}
[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: my.platform.app.product 1.0.0
[ERROR]   Missing requirement: my.platform.app.product 1.0.0 requires 'org.eclipse.equinox.executable.feature.group 0.0.0' but it could not be found
[ERROR] 
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from my.platform.app.product 0.0.1 to org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy dependency from my.platform.app.product 1.0.0 to org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from my.platform.app.product 0.0.1 to org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy dependency from my.platform.app.product 1.0.0 to org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found because the problem is unsatisfiable."]
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from my.platform.app.product 0.0.1 to org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy dependency from my.platform.app.product 1.0.0 to org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found because the problem is unsatisfiable."]
	at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
	at org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
	at org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
	at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:126)
	at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:81)
	at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:374)
	at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:350)
	at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:82)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	... 11 more
Re: Exporting an OSGi Application Project [message #1114936 is a reply to message #1114893] Mon, 23 September 2013 12:39 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
Hi,

So are you compiling against Java7? The problem there is naturally that
the jfxrt.jar IS NOT on the classpath hence compilation fails:

2 solutions:
* you temporarily copy the guy to your ext dir
* you install jfxrt.jar into your local maven repo and then your
reconfigure your tycho-compiler-plugin to hold an
<extraClasspathElements>

Something like this:
> <plugin>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>tycho-compiler-plugin</artifactId>
> <version>${tycho-version}</version>
> <configuration>
> <encoding>UTF-8</encoding>
> <!-- mvn install:install-file -Dfile=/Users/tomschindl/Applications/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar -DgroupId=javafx -DartifactId=javafx.mvn -Dversion=2.2.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true -->
> <extraClasspathElements>
> <extraClasspathElement>
> <groupId>javafx</groupId>
> <artifactId>javafx.mvn</artifactId>
> <version>2.2.0-SNAPSHOT</version>
> </extraClasspathElement>
> </extraClasspathElements>
> </configuration>
> </plugin>

You see how to install jfxrt.jar into your .m2 repo on the comment but
your maven-aware friends could explain this to you as well - I'm a maven
dummy doing monkey see monkey do.

Tom


Tom

On 23.09.13 13:16, Daniel Zimmermann wrote:
> Hi Tom,
>
> Today I started to dig into the problem of the export again. I don't
> know, why it didn't occur to me earlier, but I checked the zip file with
> the logs today and was surprised by the errors I read there
>
>
> ERROR in
> C:\Users\dzimmermann\git\standalone_container\my.platform.service\src\my\platform\interfaces\UITabComponent.java
> (at line 3)
> import javafx.scene.control.Tab;
> ^^^^^^
> The import javafx cannot be resolved
>
>
> Other errors (in other bundles, but most likly a consequnece of this one
> are for example)
>
> 1. ERROR in
> C:\Users\dzimmermann\git\standalone_container\my.platform.app\src\my\platform\app\util\Utils.java
> (at line 0)
> package my.platform.app.util;
> ^
> The type javafx.stage.Stage cannot be resolved. It is indirectly
> referenced from required .class files
>
> or
>
> ERROR in
> C:\Users\dzimmermann\git\standalone_container\my.devhandler\src\my\devhandler\ui\DevicesController.java
> (at line 53)
> public class DevicesController implements Initializable {
> ^^^^^^^^^^^^^
> Initializable cannot be resolved to a type
>
>
> And so on and so forth...
>
> Tom: Do you know, what the problem could be? And to ask the question you
> might have: No, I'm still not using Maven for the export...
>
> Regards,
> Daniel
>
> PS: Without knowing to much about Maven, I tried to update all the
> bundles pom files (added the parent-element that points to the
> releng-pom, added all bundles to the releng's modules list) and re-run
> it which caused the following error (which I'm absolutly uncertain about
> how to solve it):
>
> [INFO] {osgi.ws=noenv, osgi.os=noenv, osgi.arch=noenv,
> org.eclipse.update.install.features=true}
> [ERROR] Cannot resolve project dependencies:
> [ERROR] Software being installed: my.platform.app.product 1.0.0
> [ERROR] Missing requirement: my.platform.app.product 1.0.0 requires
> 'org.eclipse.equinox.executable.feature.group 0.0.0' but it could not be
> found
> [ERROR] [ERROR] Internal error: java.lang.RuntimeException: "No solution
> found because the problem is unsatisfiable.": ["Unable to satisfy
> dependency from my.platform.app.product 0.0.1 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
> dependency from my.platform.app.product 1.0.0 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
> because the problem is unsatisfiable."] -> [Help 1]
> org.apache.maven.InternalErrorException: Internal error:
> java.lang.RuntimeException: "No solution found because the problem is
> unsatisfiable.": ["Unable to satisfy dependency from
> my.platform.app.product 0.0.1 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
> dependency from my.platform.app.product 1.0.0 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
> because the problem is unsatisfiable."]
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:606)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
> Caused by: java.lang.RuntimeException: "No solution found because the
> problem is unsatisfiable.": ["Unable to satisfy dependency from
> my.platform.app.product 0.0.1 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
> dependency from my.platform.app.product 1.0.0 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
> because the problem is unsatisfiable."]
> at
> org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
>
> at
> org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
>
> at
> org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
>
> at
> org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:126)
>
> at
> org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:81)
>
> at
> org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:374)
>
> at
> org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:350)
>
> at
> org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
>
> at
> org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:82)
>
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
> ... 11 more
>
Re: Exporting an OSGi Application Project [message #1114937 is a reply to message #1114936] Mon, 23 September 2013 12:40 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
Oh just saw we already generate the extraClasspathElements stuff so all
you need is to execute the mvn install:intall-file.

Tom

On 23.09.13 14:39, Tom Schindl wrote:
> Hi,
>
> So are you compiling against Java7? The problem there is naturally that
> the jfxrt.jar IS NOT on the classpath hence compilation fails:
>
> 2 solutions:
> * you temporarily copy the guy to your ext dir
> * you install jfxrt.jar into your local maven repo and then your
> reconfigure your tycho-compiler-plugin to hold an
> <extraClasspathElements>
>
> Something like this:
>> <plugin>
>> <groupId>org.eclipse.tycho</groupId>
>> <artifactId>tycho-compiler-plugin</artifactId>
>> <version>${tycho-version}</version>
>> <configuration>
>> <encoding>UTF-8</encoding>
>> <!-- mvn install:install-file -Dfile=/Users/tomschindl/Applications/javafx-sdk2.2.0-beta/rt/lib/jfxrt.jar -DgroupId=javafx -DartifactId=javafx.mvn -Dversion=2.2.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true -->
>> <extraClasspathElements>
>> <extraClasspathElement>
>> <groupId>javafx</groupId>
>> <artifactId>javafx.mvn</artifactId>
>> <version>2.2.0-SNAPSHOT</version>
>> </extraClasspathElement>
>> </extraClasspathElements>
>> </configuration>
>> </plugin>
>
> You see how to install jfxrt.jar into your .m2 repo on the comment but
> your maven-aware friends could explain this to you as well - I'm a maven
> dummy doing monkey see monkey do.
>
> Tom
>
>
> Tom
>
> On 23.09.13 13:16, Daniel Zimmermann wrote:
>> Hi Tom,
>>
>> Today I started to dig into the problem of the export again. I don't
>> know, why it didn't occur to me earlier, but I checked the zip file with
>> the logs today and was surprised by the errors I read there
>>
>>
>> ERROR in
>> C:\Users\dzimmermann\git\standalone_container\my.platform.service\src\my\platform\interfaces\UITabComponent.java
>> (at line 3)
>> import javafx.scene.control.Tab;
>> ^^^^^^
>> The import javafx cannot be resolved
>>
>>
>> Other errors (in other bundles, but most likly a consequnece of this one
>> are for example)
>>
>> 1. ERROR in
>> C:\Users\dzimmermann\git\standalone_container\my.platform.app\src\my\platform\app\util\Utils.java
>> (at line 0)
>> package my.platform.app.util;
>> ^
>> The type javafx.stage.Stage cannot be resolved. It is indirectly
>> referenced from required .class files
>>
>> or
>>
>> ERROR in
>> C:\Users\dzimmermann\git\standalone_container\my.devhandler\src\my\devhandler\ui\DevicesController.java
>> (at line 53)
>> public class DevicesController implements Initializable {
>> ^^^^^^^^^^^^^
>> Initializable cannot be resolved to a type
>>
>>
>> And so on and so forth...
>>
>> Tom: Do you know, what the problem could be? And to ask the question you
>> might have: No, I'm still not using Maven for the export...
>>
>> Regards,
>> Daniel
>>
>> PS: Without knowing to much about Maven, I tried to update all the
>> bundles pom files (added the parent-element that points to the
>> releng-pom, added all bundles to the releng's modules list) and re-run
>> it which caused the following error (which I'm absolutly uncertain about
>> how to solve it):
>>
>> [INFO] {osgi.ws=noenv, osgi.os=noenv, osgi.arch=noenv,
>> org.eclipse.update.install.features=true}
>> [ERROR] Cannot resolve project dependencies:
>> [ERROR] Software being installed: my.platform.app.product 1.0.0
>> [ERROR] Missing requirement: my.platform.app.product 1.0.0 requires
>> 'org.eclipse.equinox.executable.feature.group 0.0.0' but it could not be
>> found
>> [ERROR] [ERROR] Internal error: java.lang.RuntimeException: "No solution
>> found because the problem is unsatisfiable.": ["Unable to satisfy
>> dependency from my.platform.app.product 0.0.1 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
>> dependency from my.platform.app.product 1.0.0 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
>> because the problem is unsatisfiable."] -> [Help 1]
>> org.apache.maven.InternalErrorException: Internal error:
>> java.lang.RuntimeException: "No solution found because the problem is
>> unsatisfiable.": ["Unable to satisfy dependency from
>> my.platform.app.product 0.0.1 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
>> dependency from my.platform.app.product 1.0.0 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
>> because the problem is unsatisfiable."]
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>>
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>>
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: java.lang.RuntimeException: "No solution found because the
>> problem is unsatisfiable.": ["Unable to satisfy dependency from
>> my.platform.app.product 0.0.1 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
>> dependency from my.platform.app.product 1.0.0 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
>> because the problem is unsatisfiable."]
>> at
>> org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.newResolutionException(AbstractResolutionStrategy.java:98)
>>
>> at
>> org.eclipse.tycho.p2.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)
>>
>> at
>> org.eclipse.tycho.p2.resolver.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:63)
>>
>> at
>> org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:126)
>>
>> at
>> org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:81)
>>
>> at
>> org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:374)
>>
>> at
>> org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolveDependencies(P2TargetPlatformResolver.java:350)
>>
>> at
>> org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:109)
>>
>> at
>> org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:82)
>>
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:274)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
>> ... 11 more
>>
>
Re: Exporting an OSGi Application Project [message #1115008 is a reply to message #1114937] Mon, 23 September 2013 14:24 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Hi Tom,

sorry, that I didn't mentioned it, that I'm using Java7...

I saw, that there is that extraClasspathEntry element. I currently don't understand what you mean by
a) copying the jfxrt.jar into the "ext" dir <- which one is the "ext" dir? I guess I would need to do this for the product-based export
b) the tycho-thing: So I call the "mvn install [...]" stuff (from the CLI), you did in your first post, before starting the Maven task in Eclipse? Is that correct?

Thanks again,
Daniel
Re: Exporting an OSGi Application Project [message #1115020 is a reply to message #1115008] Mon, 23 September 2013 14:31 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
it's one of the other!
On 23.09.13 16:24, Daniel Zimmermann wrote:
> Hi Tom,
>
> sorry, that I didn't mentioned it, that I'm using Java7...
>
> I saw, that there is that extraClasspathEntry element. I currently don't
> understand what you mean by a) copying the jfxrt.jar into the "ext" dir
> <- which one is the "ext" dir? I guess I would need to do this for the
> product-based export

this is the extension-lib dir of your JRE - but this would pollute your
jre which is not good

> b) the tycho-thing: So I call the "mvn install [...]" stuff (from the
> CLI), you did in your first post, before starting the Maven task in
> Eclipse? Is that correct?
>

yes - this is the option to go

> Thanks again,
> Daniel
Re: Exporting an OSGi Application Project [message #1115040 is a reply to message #1115020] Mon, 23 September 2013 15:11 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Ok I still don't see the connection between the missing jfxrt.jar and the "org.eclipse.equinox.executable.feature.group" element, but since you're the one of us two actualy knowing, what he's doing, I think I should just believe you! Wink

One final question... For now...
When I execute the command (with the correct path/to/my/jfxrt.jar from a random path, the build failes with something "The goal you specified requires a project to execute but there is no POM in this directory (C:\Users\dzimmermann\.m2). Please verify you invoked Maven from the correct directory." - so I need to create a new and empty maven project within the .m2/repositories directory? Or do I have to invoke the code from within my releng-project?)

I'm indeed sorry to ask all this questions, but my maven-aware colleagues already went home... :-/
Re: Exporting an OSGi Application Project [message #1115050 is a reply to message #1115040] Mon, 23 September 2013 15:30 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Beside the stuff from my last post, I just saw this StackOverflow question: http://stackoverflow.com/questions/15278215/maven-project-with-javafx-with-jar-file-in-lib
Would a system dependecy as described in the answer be sufficient enough? What do you think? I will try this tomorrow, for now I'm done with it...

Thanks and bye,
Daniel
Re: Exporting an OSGi Application Project [message #1115077 is a reply to message #1115050] Mon, 23 September 2013 16:23 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
most likely.

Tom

On 23.09.13 17:30, Daniel Zimmermann wrote:
> Beside the stuff from my last post, I just saw this StackOverflow
> question:
> http://stackoverflow.com/questions/15278215/maven-project-with-javafx-with-jar-file-in-lib
> Would a system dependecy as described in the answer be sufficient
> enough? What do you think? I will try this tomorrow, for now I'm done
> with it...
>
> Thanks and bye,
> Daniel
Re: Exporting an OSGi Application Project [message #1115078 is a reply to message #1115040] Mon, 23 September 2013 16:25 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
did it copy the jfxrt.jar to the .m2 hierarchy? The problem you see is
that the compiler is unable to compile your classes because jfxrt.jar is
not on a classpath (the lib folder stuff is NOT on the default classpath
for your JRE hence the compiler can't find the javafx classes).

Tom

On 23.09.13 17:11, Daniel Zimmermann wrote:
> Ok I still don't see the connection between the missing jfxrt.jar and
> the "org.eclipse.equinox.executable.feature.group" element, but since
> you're the one of us two actualy knowing, what he's doing, I think I
> should just believe you! ;)
>
> One final question... For now...
> When I execute the command (with the correct path/to/my/jfxrt.jar from a
> random path, the build failes with something "The goal you specified
> requires a project to execute but there is no POM in this directory
> (C:\Users\dzimmermann\.m2). Please verify you invoked Maven from the
> correct directory." - so I need to create a new and empty maven project
> within the .m2/repositories directory? Or do I have to invoke the code
> from within my releng-project?)
>
> I'm indeed sorry to ask all this questions, but my maven-aware
> colleagues already went home... :-/
Re: Exporting an OSGi Application Project [message #1115507 is a reply to message #1115078] Tue, 24 September 2013 07:40 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
Quote:
did it copy the jfxrt.jar to the .m2 hierarchy? The problem you see is
that the compiler is unable to compile your classes because jfxrt.jar is
not on a classpath


No unfortunatly it didn't copy the jfxrt,jar into a maven bundle. There was just this error message telling me the build failed.
I even tried to copy the file into Java's ext directory but this didn't help (with the product export) either.
I will now try the system dependency, but it's getting more and more like searche for the needle in the hay stack... I will tell you, if the system dependency is working. If not - well - then I'm kinda lost.
Re: Exporting an OSGi Application Project [message #1115522 is a reply to message #1115507] Tue, 24 September 2013 07:58 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
So are you now using maven or the product-export from within Eclipse?

Tom

On 24.09.13 09:40, Daniel Zimmermann wrote:
> Quote:
>> did it copy the jfxrt.jar to the .m2 hierarchy? The problem you see is
>> that the compiler is unable to compile your classes because jfxrt.jar is
>> not on a classpath
>
>
> No unfortunatly it didn't copy the jfxrt,jar into a maven bundle. There
> was just this error message telling me the build failed.
> I even tried to copy the file into Java's ext directory but this didn't
> help (with the product export) either.
> I will now try the system dependency, but it's getting more and more
> like searche for the needle in the hay stack... I will tell you, if the
> system dependency is working. If not - well - then I'm kinda lost.
Re: Exporting an OSGi Application Project [message #1115543 is a reply to message #1115522] Tue, 24 September 2013 08:34 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
I tried both. Both using jdk7.

1) Maven - w/ or w/o the system dependecy I always get the error I described above

[ERROR] Cannot resolve project dependencies:
[ERROR]   Software being installed: ch.cnlab.swag.platform.app.product 1.0.0
[ERROR]   Missing requirement: ch.cnlab.swag.platform.app.product 1.0.0 requires 'org.eclipse.equinox.executable.feature.group 0.0.0' but it could not be found
[ERROR] 
[ERROR] Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from ch.cnlab.swag.platform.app.product 0.0.1 to org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy dependency from ch.cnlab.swag.platform.app.product 1.0.0 to org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found because the problem is unsatisfiable."] -> [Help 1]


2) Product build - no class files (doesn't matter if I add the jfxrt.jar to the ext dir or not)
Re: Exporting an OSGi Application Project [message #1115560 is a reply to message #1115543] Tue, 24 September 2013 09:02 Go to previous messageGo to next message
Daniel Zimmermann is currently offline Daniel Zimmermann
Messages: 70
Registered: July 2009
Member
I managed to have a working build with the product base build mechanism. I'm not really satisfied with a) the idea of using products or b) the way I fixed it: I copied the jfxrt.jar into a libs directory in one of my bundles and added a build-dependency to it on the build page ("Extra Classpath Entries") of each other bundle to it (since it says "List any extra libraries required on the plug-in's classpath for successful compilation." I figured this could help and it did indeed).
I'd still rather make use the maven thing but my colleagues never used tycho and were confused where the other dependencies came in (at least this I was pretty sure about, that tycho does that for us). If you have any suggestions about the "org.eclipse.equinox.executable", I'd gladly use this...
Re: Exporting an OSGi Application Project [message #1115598 is a reply to message #1115543] Tue, 24 September 2013 10:05 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
so this means that we need to get this going, what looks supisicous is
that it tells:

ch.cnlab.swag.platform.app.product 1.0.0
ch.cnlab.swag.platform.app.product 0.0.1

So maybe your versioning does NOT match.

Tom

On 24.09.13 10:34, Daniel Zimmermann wrote:
> I tried both. Both using jdk7.
>
> 1) Maven - w/ or w/o the system dependecy I always get the error I
> described above
>
>
> [ERROR] Cannot resolve project dependencies:
> [ERROR] Software being installed: ch.cnlab.swag.platform.app.product
> 1.0.0
> [ERROR] Missing requirement: ch.cnlab.swag.platform.app.product 1.0.0
> requires 'org.eclipse.equinox.executable.feature.group 0.0.0' but it
> could not be found
> [ERROR] [ERROR] Internal error: java.lang.RuntimeException: "No solution
> found because the problem is unsatisfiable.": ["Unable to satisfy
> dependency from ch.cnlab.swag.platform.app.product 0.0.1 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
> dependency from ch.cnlab.swag.platform.app.product 1.0.0 to
> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
> because the problem is unsatisfiable."] -> [Help 1]
>
>
> 2) Product build - no class files (doesn't matter if I add the jfxrt.jar
> to the ext dir or not)
Re: Exporting an OSGi Application Project [message #1115601 is a reply to message #1115560] Tue, 24 September 2013 10:08 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
On 24.09.13 11:02, Daniel Zimmermann wrote:
> I managed to have a working build with the product base build mechanism.
> I'm not really satisfied with a) the idea of using products or b) the
> way I fixed it: I copied the jfxrt.jar into a libs directory in one of
> my bundles and added a build-dependency to it on the build page ("Extra
> Classpath Entries") of each other bundle to it (since it says "List any
> extra libraries required on the plug-in's classpath for successful
> compilation." I figured this could help and it did indeed).

This is not how this should work and it will cause troubles when you
have to classes of e.g. Node, ... .

> I'd still rather make use the maven thing but my colleagues never used
> tycho and were confused where the other dependencies came in (at least
> this I was pretty sure about, that tycho does that for us). If you have
> any suggestions about the "org.eclipse.equinox.executable", I'd gladly
> use this...

Yes tycho internally does all the dependency resolving using the
MANIFEST.MF-Files and the p2-repos you point it to.

Our company offers professional support - I expect to have this problem
resolved in less than an hour if I have access to the source - You
really have to get the MAVEN-Build going this is the only future proof way.

You can get in touch with me at tom.schindl@xxxxxxxx

Tom
Re: Exporting an OSGi Application Project [message #1115602 is a reply to message #1115598] Tue, 24 September 2013 10:10 Go to previous message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5332
Registered: July 2009
Senior Member
Tycho is a lot more picky than the eclipse product export!

Tom

On 24.09.13 12:05, Tom Schindl wrote:
> so this means that we need to get this going, what looks supisicous is
> that it tells:
>
> ch.cnlab.swag.platform.app.product 1.0.0
> ch.cnlab.swag.platform.app.product 0.0.1
>
> So maybe your versioning does NOT match.
>
> Tom
>
> On 24.09.13 10:34, Daniel Zimmermann wrote:
>> I tried both. Both using jdk7.
>>
>> 1) Maven - w/ or w/o the system dependecy I always get the error I
>> described above
>>
>>
>> [ERROR] Cannot resolve project dependencies:
>> [ERROR] Software being installed: ch.cnlab.swag.platform.app.product
>> 1.0.0
>> [ERROR] Missing requirement: ch.cnlab.swag.platform.app.product 1.0.0
>> requires 'org.eclipse.equinox.executable.feature.group 0.0.0' but it
>> could not be found
>> [ERROR] [ERROR] Internal error: java.lang.RuntimeException: "No solution
>> found because the problem is unsatisfiable.": ["Unable to satisfy
>> dependency from ch.cnlab.swag.platform.app.product 0.0.1 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "Unable to satisfy
>> dependency from ch.cnlab.swag.platform.app.product 1.0.0 to
>> org.eclipse.equinox.executable.feature.group 0.0.0.", "No solution found
>> because the problem is unsatisfiable."] -> [Help 1]
>>
>>
>> 2) Product build - no class files (doesn't matter if I add the jfxrt.jar
>> to the ext dir or not)
>
Previous Topic:ClassNotFoundException when loading Controller via FXML
Next Topic:Relative width of Parts in PartSashContainer - containerData has no effect
Goto Forum:
  


Current Time: Tue Sep 23 20:37:55 GMT 2014

Powered by FUDForum. Page generated in 0.02842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software