Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-user] tycho-versions-plugin and maven profiles

Hi,

 

We are facing some issues with the “tycho-versions-plugin” and maven profiles.

We didn’t succeed to get it working using tycho version 1.0.0 or 1.1.0-SNAPSHOT

 

Here you can find an example to reproduce the error: https://github.com/chrisolivier/tycho-example

This is a RCP/RAP application using profiles to be able to build both versions.

 

The project contains some optional dependencies that we ignore with the tag  ‘<optionalDependencies>’ and extra requirement for each profile like ‘org.eclipse.ui’ and ‘org.eclipse.rap.ui’ etc ..

We also use tycho-pomless 1.0.0

The application structure was inspired by this tutorial : http://www.vogella.com/tutorials/EclipseTycho/article.html#exercise-configure-tycho-build

 

Using the following command line we get a ResolverException :

./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=1.2.0-SNAPSHOT -Dartifacts=com.compufirst.configuration -P rcp,rap -e

 

 

[ERROR] Cannot resolve project dependencies:

[ERROR]   Software being installed: com.compufirst.rcp 1.1.0.qualifier

[ERROR]   Missing requirement: com.compufirst.rcp 1.1.0.qualifier requires 'bundle org.eclipse.swt 0.0.0' but it could not be found

[ERROR]

[ERROR] See http://wiki.eclipse.org/Tycho/Dependency_Resolution_Troubleshooting for help.

[ERROR] Cannot resolve dependencies of MavenProject: com.compufirst.tycho:com.compufirst.rcp:1.1.0-SNAPSHOT @ C:\Users\christophe\git\tycho-example\bundles\com.compufirst.rcp\.polyglot.build.properties: See log for details -> [Help 1]

org.apache.maven.MavenExecutionException: Cannot resolve dependencies of MavenProject: com.compufirst.tycho:com.compufirst.rcp:1.1.0-SNAPSHOT @ C:\Users\christophe\git\tycho-example\bundles\com.compufirst.rcp\.polyglot.build.properties

        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:100)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:267)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)

        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)

        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)

        at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)

        at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:60)

Caused by: org.eclipse.tycho.artifacts.DependencyResolutionException: Cannot resolve dependencies of MavenProject: com.compufirst.tycho:com.compufirst.rcp:1.1.0-SNAPSHOT @ C:\Users\christophe\git\tycho-example\bundles\com.compufirst.rcp\.polyglot.build.properties

        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:201)

        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:115)

        at org.eclipse.tycho.p2.resolver.P2DependencyResolver.doResolveDependencies(P2DependencyResolver.java:367)

        at org.eclipse.tycho.p2.resolver.P2DependencyResolver.resolveDependencies(P2DependencyResolver.java:335)

        at org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:117)

        at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:95)

        ... 21 more

Caused by: org.eclipse.tycho.p2.util.resolution.ResolverException: See log for details

        at org.eclipse.tycho.p2.util.resolution.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:88)

        at org.eclipse.tycho.p2.util.resolution.AbstractResolutionStrategy.resolve(AbstractResolutionStrategy.java:42)

        at org.eclipse.tycho.p2.resolver.P2ResolverImpl.resolveDependencies(P2ResolverImpl.java:194)

        ... 26 more

 

With only one profile we get a NPE :

./mvnw org.eclipse.tycho:tycho-versions-plugin:set-version -DnewVersion=1.2.0-SNAPSHOT -Dartifacts=com.compufirst.configuration -P rcp -e

 

 

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-versions-plugin:1.1.0-SNAPSHOT:set-version (default-cli) on project com.compufirst.tycho.root: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:1.1.0-SNAPSHOT:set-version failed.: NullPointerException -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-versions-plugin:1.1.0-SNAPSHOT:set-version (default-cli) on project com.compufirst.tycho.root: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:1.1.0-SNAPSHOT:set-version failed.

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)

        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)

        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)

        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)

        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:309)

        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)

        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)

        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)

        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)

        at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:497)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

       at java.lang.reflect.Method.invoke(Method.java:497)

        at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)

        at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)

        at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:60)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.eclipse.tycho:tycho-versions-plugin:1.1.0-SNAPSHOT:set-version failed.

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)

        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)

        ... 27 more

Caused by: java.lang.NullPointerException

        at org.eclipse.tycho.versions.engine.VersionsEngine.getProject(VersionsEngine.java:167)

        at org.eclipse.tycho.versions.engine.VersionsEngine.getMutablePom(VersionsEngine.java:89)

        at org.eclipse.tycho.versions.engine.VersionsEngine.addVersionChange(VersionsEngine.java:81)

        at org.eclipse.tycho.versions.SetMojo.execute(SetMojo.java:129)

        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

        ... 28 more

 

 

If we comment 1 profile in pom files and run it again it’s working, obviously only bundles referenced within the remaining profile are updated.

Has somebody encountered the same issue?

Have we done something wrong in our pom files ?

 

Thanks

 

Christophe

 

 

compufirst.2


Back to the top