Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Maven Integration (M2E) » [tycho-0.3.0-DEV-1983] Issues with product export
[tycho-0.3.0-DEV-1983] Issues with product export [message #21218] Tue, 27 January 2009 14:06 Go to next message
Matthias Treitler is currently offline Matthias Treitler
Messages: 117
Registered: July 2009
Senior Member
Hi!

First of all thank you very, very much for Tycho!

I have tried the latest DEV version of Tycho (1983) with a simple Hello
World Eclipse RCP application and run over two issues:

1)
When my MANIFEST.MF file contains a "Bundle-RequiredExecutionEnvironment:
JavaSE-1.6" then I get the following error:
Error stacktrace:
org.apache.maven.reactor.MavenExecutionException: Bundle
at.quorum.octopus.rcp cannot be resolved
Resolution errors:
Bundle at.quorum.octopus.rcp - Missing Constraint:
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

at
org.codehaus.tycho.osgitools.OsgiBundleDependenciesReader.ge tDependencies(OsgiBundleDependenciesReader.java:32)
at
org.codehaus.tycho.maven.EclipseMaven.resolveOSGiState(Eclip seMaven.java:77)
at
org.codehaus.tycho.maven.EclipseMaven.getProjects(EclipseMav en.java:38)
at
org.apache.maven.DefaultMaven.createReactorManager(DefaultMa ven.java:97)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedde r.java:846)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha nced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau ncher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx itCode(Launcher.java:408)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc her.java:351)

When I remove this header entry the pom.xml will be generated...



2)
I have extreacted the RCP Delta Pack and Win32 RCP pack as my target
platform. Then I want to build my RCP product but I get the following
exception:

Error stacktrace:
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in
the plugin manager executing goal
'org.codehaus.tycho:maven-osgi-packaging-plugin:0.3.0-DEV-19 83:product-export':
Mojo execution failed.
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeG oalAndHandleFailures(DefaultLifecycleExecutor.java:499)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeT askSegmentForProject(DefaultLifecycleExecutor.java:259)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeT askSegments(DefaultLifecycleExecutor.java:201)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:164)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:207)
at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedde r.java:846)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha nced(Launcher.java:289)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau ncher.java:229)
at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx itCode(Launcher.java:408)
at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc her.java:351)
Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo
execution failed.
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(Def aultPluginManager.java:651)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeG oalAndHandleFailures(DefaultLifecycleExecutor.java:492)
... 15 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Plugin
'org.eclipse.core.runtime.compatibility.registry_highest version' not
found!
at
org.codehaus.tycho.eclipsepackaging.ProductExportMojo.copyPl ugin(ProductExportMojo.java:372)
at
org.codehaus.tycho.eclipsepackaging.ProductExportMojo.copyPl ugins(ProductExportMojo.java:335)
at
org.codehaus.tycho.eclipsepackaging.ProductExportMojo.execut e(ProductExportMojo.java:118)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(Def aultPluginManager.java:629)
... 16 more

A workaround is copying the
" org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610 " from
the Eclipse SDK to my target platform. Then everything works but I get the
following warning in the build: "[WARNING] Dependency at location
D:\eclipse-RCP-SDK\eclipse\plugins\org.eclipse.core.runtime. compatibility.registry_3.2.200.v20080610
can not be represented in Maven model and will not be visible to non-OSGi
aware Maven plugins".
Maybe I am doing something wrong.

However Tycho builds my product and everything works fine.

Cheers,
Matthias
Re: [tycho-0.3.0-DEV-1983] Issues with product export [message #21267 is a reply to message #21218] Wed, 28 January 2009 04:27 Go to previous messageGo to next message
Eclipse User
Originally posted by: igor.ifedorenko.com

Matthias,

1. Internally, Tycho uses Equinox OSGi resolver with execution
environment set to the JDK used to run Tycho. The error message suggests
you are using java 5. Can you confirm this?

Also note that Tycho requires very minimal pom.xml files, so you may as
well create them by hand. We also recommend checking pom.xml files
(generated or handwritten) into source control system.

2. Tycho target platform has to include all bundles and features needed
to build, test and package your project. It is not clear whether
org.eclipse.core.runtime.compatibility.registry is legitimate/expected
dependency or whether you think Tycho should not need this bundle to
build your project. Can you explain?

The warning that you see simply means that
org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610 is
directory structure, not a single JAR, and standard maven plugins like
maven-dependency-plugin, are not currently able to use such
dependencies. These warnings are safe to ignore in most cases.

--
Regards,
Igor

Matthias Treitler wrote:
> Hi!
>
> First of all thank you very, very much for Tycho!
> I have tried the latest DEV version of Tycho (1983) with a simple Hello
> World Eclipse RCP application and run over two issues:
>
> 1)
> When my MANIFEST.MF file contains a
> "Bundle-RequiredExecutionEnvironment: JavaSE-1.6" then I get the
> following error:
> Error stacktrace:
> org.apache.maven.reactor.MavenExecutionException: Bundle
> at.quorum.octopus.rcp cannot be resolved
> Resolution errors:
> Bundle at.quorum.octopus.rcp - Missing Constraint:
> Bundle-RequiredExecutionEnvironment: JavaSE-1.6
>
> at
> org.codehaus.tycho.osgitools.OsgiBundleDependenciesReader.ge tDependencies(OsgiBundleDependenciesReader.java:32)
>
> at
> org.codehaus.tycho.maven.EclipseMaven.resolveOSGiState(Eclip seMaven.java:77)
>
> at
> org.codehaus.tycho.maven.EclipseMaven.getProjects(EclipseMav en.java:38)
> at
> org.apache.maven.DefaultMaven.createReactorManager(DefaultMa ven.java:97)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
> at
> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedde r.java:846)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha nced(Launcher.java:289)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau ncher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx itCode(Launcher.java:408)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc her.java:351)
>
> When I remove this header entry the pom.xml will be generated...
>
>
>
> 2)
> I have extreacted the RCP Delta Pack and Win32 RCP pack as my target
> platform. Then I want to build my RCP product but I get the following
> exception:
>
> Error stacktrace:
> org.apache.maven.lifecycle.LifecycleExecutionException: Internal error
> in the plugin manager executing goal
> 'org.codehaus.tycho:maven-osgi-packaging-plugin:0.3.0-DEV-19 83:product-export':
> Mojo execution failed.
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeG oalAndHandleFailures(DefaultLifecycleExecutor.java:499)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeT askSegmentForProject(DefaultLifecycleExecutor.java:259)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeT askSegments(DefaultLifecycleExecutor.java:201)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute( DefaultLifecycleExecutor.java:164)
>
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:207)
> at
> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedde r.java:846)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:160)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:63)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnha nced(Launcher.java:289)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Lau ncher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithEx itCode(Launcher.java:408)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launc her.java:351)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Mojo
> execution failed.
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(Def aultPluginManager.java:651)
>
> at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeG oalAndHandleFailures(DefaultLifecycleExecutor.java:492)
>
> ... 15 more
> Caused by: org.apache.maven.plugin.MojoExecutionException: Plugin
> 'org.eclipse.core.runtime.compatibility.registry_highest version' not
> found!
> at
> org.codehaus.tycho.eclipsepackaging.ProductExportMojo.copyPl ugin(ProductExportMojo.java:372)
>
> at
> org.codehaus.tycho.eclipsepackaging.ProductExportMojo.copyPl ugins(ProductExportMojo.java:335)
>
> at
> org.codehaus.tycho.eclipsepackaging.ProductExportMojo.execut e(ProductExportMojo.java:118)
>
> at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(Def aultPluginManager.java:629)
>
> ... 16 more
>
> A workaround is copying the
> " org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610 " from
> the Eclipse SDK to my target platform. Then everything works but I get
> the following warning in the build: "[WARNING] Dependency at location
> D:\eclipse-RCP-SDK\eclipse\plugins\org.eclipse.core.runtime. compatibility.registry_3.2.200.v20080610
> can not be represented in Maven model and will not be visible to
> non-OSGi aware Maven plugins".
> Maybe I am doing something wrong.
>
> However Tycho builds my product and everything works fine.
> Cheers,
> Matthias
>
Re: [tycho-0.3.0-DEV-1983] Issues with product export [message #21282 is a reply to message #21267] Wed, 28 January 2009 09:48 Go to previous messageGo to next message
Matthias Treitler is currently offline Matthias Treitler
Messages: 117
Registered: July 2009
Senior Member
Hi Igor,

thank you for your quick response!
See my comments inline:

Igor Fedorenko wrote:

> Matthias,

> 1. Internally, Tycho uses Equinox OSGi resolver with execution
> environment set to the JDK used to run Tycho. The error message suggests
> you are using java 5. Can you confirm this?
MT: Oh thank you for this tip. My java -version was 1.6 but my JAVA_HOME
variable pointed to a JDK 1.5 installation. Thanks!!

> Also note that Tycho requires very minimal pom.xml files, so you may as
> well create them by hand. We also recommend checking pom.xml files
> (generated or handwritten) into source control system.
MT: Ok, so this is good practice.

> 2. Tycho target platform has to include all bundles and features needed
> to build, test and package your project. It is not clear whether
> org.eclipse.core.runtime.compatibility.registry is legitimate/expected
> dependency or whether you think Tycho should not need this bundle to
> build your project. Can you explain?

MT: No I don't not have any dependencies to this plug-in in all of my
plug-ins. Also eclipse.core.runtime does not depend on it. It is somewhat
strange that tycho needs (?) this plug-in.

> The warning that you see simply means that
> org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610 is
> directory structure, not a single JAR, and standard maven plugins like
> maven-dependency-plugin, are not currently able to use such
> dependencies. These warnings are safe to ignore in most cases.
MT: OK

> --
> Regards,
> Igor

MT: I also have some regarding testing:
1. Why is the maven-osgi-test-plugin bound to integration-test and not to
test lifecycle (I have no problem with it, just for understanding).
2. What is the best way to develop a test plug-in?!? The test plug-in must
have an dependency to org.junit. Ok, but then the org.junit must also be
in the target platform which is shipped later to the final product as a
plug-in. Is this Ok so?!

Cheers,
Matthias
Re: [tycho-0.3.0-DEV-1983] Issues with product export [message #21306 is a reply to message #21282] Wed, 28 January 2009 15:07 Go to previous messageGo to next message
Eclipse User
Originally posted by: igor.ifedorenko.com

Matthias Treitler wrote:
> Hi Igor,
>
> thank you for your quick response!
> See my comments inline:
>
> Igor Fedorenko wrote:
>
>> Matthias,
>
>> 1. Internally, Tycho uses Equinox OSGi resolver with execution
>> environment set to the JDK used to run Tycho. The error message
>> suggests you are using java 5. Can you confirm this?
> MT: Oh thank you for this tip. My java -version was 1.6 but my JAVA_HOME
> variable pointed to a JDK 1.5 installation. Thanks!!
>
>> Also note that Tycho requires very minimal pom.xml files, so you may
>> as well create them by hand. We also recommend checking pom.xml files
>> (generated or handwritten) into source control system.
> MT: Ok, so this is good practice.
>
>> 2. Tycho target platform has to include all bundles and features
>> needed to build, test and package your project. It is not clear
>> whether org.eclipse.core.runtime.compatibility.registry is
>> legitimate/expected dependency or whether you think Tycho should not
>> need this bundle to build your project. Can you explain?
>
> MT: No I don't not have any dependencies to this plug-in in all of my
> plug-ins. Also eclipse.core.runtime does not depend on it. It is
> somewhat strange that tycho needs (?) this plug-in.
>

In theory, Tycho build should need exactly the same set of dependencies
as PDE, note that the this includes any required indirect dependency
bundles. You can expand "Plug-in Dependencies" classpath container of
your project in Package View in PDE and/or use "Plug-in Dependencies"
view to see all direct and indirect dependencies of your bundle. If
there is a discrepancy between PDE and Tycho, please open bugreport in
JIRA [1] with sample project that demonstrate the problem.

As far as I know, org.eclipse.core.runtime.compatibility.registry is a
fragment, so it is indeed strange to see dependency resolution failures
when it is missing.


>> The warning that you see simply means that
>> org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610 is
>> directory structure, not a single JAR, and standard maven plugins like
>> maven-dependency-plugin, are not currently able to use such
>> dependencies. These warnings are safe to ignore in most cases.
> MT: OK
>
>> --
>> Regards,
>> Igor
>
> MT: I also have some regarding testing:
> 1. Why is the maven-osgi-test-plugin bound to integration-test and not
> to test lifecycle (I have no problem with it, just for understanding).

Right now, test runtime includes all build bundles, so it really tests
how everything works together, not individual projects.

> 2. What is the best way to develop a test plug-in?!? The test plug-in
> must have an dependency to org.junit. Ok, but then the org.junit must
> also be in the target platform which is shipped later to the final
> product as a plug-in. Is this Ok so?!

You don't have to ship org.junit with your product even if it was part
of the build target platform (if I understood your concerns correctly).
We plan to improve Tycho build target platform management, so you may
want to submit enhancement request in JIRA and explain desired behaviour.


[1] http://jira.codehaus.org/browse/MNGECLIPSE
Re: [tycho-0.3.0-DEV-1983] Issues with product export [message #21655 is a reply to message #21306] Mon, 02 February 2009 09:07 Go to previous message
Matthias Treitler is currently offline Matthias Treitler
Messages: 117
Registered: July 2009
Senior Member
Hi Igor,

Thanks for your answer and see comments inline!

cheers,
matthias

Igor Fedorenko wrote:

> Matthias Treitler wrote:
>> Hi Igor,
>>
>> thank you for your quick response!
>> See my comments inline:
>>
>> Igor Fedorenko wrote:
>>
>>> Matthias,
>>
>>> 1. Internally, Tycho uses Equinox OSGi resolver with execution
>>> environment set to the JDK used to run Tycho. The error message
>>> suggests you are using java 5. Can you confirm this?
>> MT: Oh thank you for this tip. My java -version was 1.6 but my JAVA_HOME
>> variable pointed to a JDK 1.5 installation. Thanks!!
>>
>>> Also note that Tycho requires very minimal pom.xml files, so you may
>>> as well create them by hand. We also recommend checking pom.xml files
>>> (generated or handwritten) into source control system.
>> MT: Ok, so this is good practice.
>>
>>> 2. Tycho target platform has to include all bundles and features
>>> needed to build, test and package your project. It is not clear
>>> whether org.eclipse.core.runtime.compatibility.registry is
>>> legitimate/expected dependency or whether you think Tycho should not
>>> need this bundle to build your project. Can you explain?
>>
>> MT: No I don't not have any dependencies to this plug-in in all of my
>> plug-ins. Also eclipse.core.runtime does not depend on it. It is
>> somewhat strange that tycho needs (?) this plug-in.
>>

> In theory, Tycho build should need exactly the same set of dependencies
> as PDE, note that the this includes any required indirect dependency
> bundles. You can expand "Plug-in Dependencies" classpath container of
> your project in Package View in PDE and/or use "Plug-in Dependencies"
> view to see all direct and indirect dependencies of your bundle. If
> there is a discrepancy between PDE and Tycho, please open bugreport in
> JIRA [1] with sample project that demonstrate the problem.

> As far as I know, org.eclipse.core.runtime.compatibility.registry is a
> fragment, so it is indeed strange to see dependency resolution failures
> when it is missing.

MT: After setting the JAVA_HOME to the correct root directory of the java
JDK Tycho or (PDE) does not need the
"org.eclipse.core.runtime.compatibility.registry" fragment any more. It
seems I only need it when the java executable version differs from the
JAVA_HOME path version.


>>> The warning that you see simply means that
>>> org.eclipse.core.runtime.compatibility.registry_3.2.200.v200 80610 is
>>> directory structure, not a single JAR, and standard maven plugins like
>>> maven-dependency-plugin, are not currently able to use such
>>> dependencies. These warnings are safe to ignore in most cases.
>> MT: OK
>>
>>> --
>>> Regards,
>>> Igor
>>
>> MT: I also have some regarding testing:
>> 1. Why is the maven-osgi-test-plugin bound to integration-test and not
>> to test lifecycle (I have no problem with it, just for understanding).

> Right now, test runtime includes all build bundles, so it really tests
> how everything works together, not individual projects.

>> 2. What is the best way to develop a test plug-in?!? The test plug-in
>> must have an dependency to org.junit. Ok, but then the org.junit must
>> also be in the target platform which is shipped later to the final
>> product as a plug-in. Is this Ok so?!

> You don't have to ship org.junit with your product even if it was part
> of the build target platform (if I understood your concerns correctly).
> We plan to improve Tycho build target platform management, so you may
> want to submit enhancement request in JIRA and explain desired behaviour.

> [1] http://jira.codehaus.org/browse/MNGECLIPSE
Previous Topic:[tycho] Newbie: Current capabilities of Tycho
Next Topic:pluginManagement, extensions versioning issue
Goto Forum:
  


Current Time: Fri Oct 24 12:09:59 GMT 2014

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

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