Discussion:
[tycho-user] Tycho build feature with maven repository
Ismael Soulama
2017-06-14 07:38:25 UTC
Permalink
Hi,
I'm trying to build an Eclipse feature with tycho.
But in my feature, I have a plugin deployed in a maven repository.
In my pom.xml, I use:
[code]...
<dependencyManagement>
<dependency>
<groupId>my.plugin</groupId>
<artifactId>my.plugin</artifactId>
<version>${my.plugin.version}</version>
</dependency>
<dependency>
<groupId>my.plugin</groupId>
<artifactId>my.plugin</artifactId>
<version>${my.plugin.version}</version>
<classifier>p2metadata</classifier>
<type>xml</type>
</dependency>
<dependency>
<groupId>my.plugin</groupId>
<artifactId>my.plugin</artifactId>
<version>${my.plugin.version}</version>
<classifier>p2artifacts</classifier>
<type>xml</type>
</dependency>
</dependencyManagement>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<configuration>
<pomDependencies>consider</pomDependencies>
</configuration>
</plugin>
...[/code]

But the build failes with:
[code]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:30.608s
[INFO] Finished at: Tue Jun 13 17:47:51 CEST 2017
[INFO] Final Memory: 158M/850M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-feature (default-package-feature) on project my.feature: Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-feature failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-feature (default-package-feature) on project my.feature: Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-feature failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
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:498)
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)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-package-feature of goal org.eclipse.tycho:tycho-packaging-plugin:1.0.0:package-feature failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:115)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.NullPointerException
at org.eclipse.tycho.packaging.FeatureXmlTransformer.setDownloadAndInstallSize(FeatureXmlTransformer.java:108)
at org.eclipse.tycho.packaging.FeatureXmlTransformer.expandReferences(FeatureXmlTransformer.java:64)
at org.eclipse.tycho.packaging.PackageFeatureMojo.expandVersionQualifiers(PackageFeatureMojo.java:254)
at org.eclipse.tycho.packaging.PackageFeatureMojo.execute(PackageFeatureMojo.java:125)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
... 20 more
[/code]

Did someone know what's wrong in it?

Loading...