[fedora-java] Packaging m2e-wtp

Julius Schwartzenberg julius.schwartzenberg at abz.nl
Fri Mar 6 09:42:38 UTC 2015


On 03/02/2015 04:08 PM, Roland Grunberg wrote:
> There may be a workaround you could try that would avoid having to OSGi-ify
> maven-war-plugin. If you add the attribute 'Eclipse-BundleShape: dir' into
> the MANIFEST.MF for org.eclipse.m2e.wtp, then symlink the system jar for
> maven-war-plugin matching the name listed in Bundle-ClassPath, the build
> should work. The purpose of adding that attribute above is to avoid packaging
> the plugin as a jar, with an embedded jar, which is against guidelines. I
> think you'd probably have to re-symlink the jar for %%install as well.

The workaround works, thanks! The build gets much further now. I'm 
running into the next issue now. A stack trace from Tycho. Could that be 
due to the different Tycho version? I would not expect an exception like 
that in this case though, so it seems like a peculiarity in the 
packaging process to me.

[ERROR] Failed to execute goal 
org.eclipse.tycho:tycho-p2-plugin:0.21.0:p2-metadata 
(attach-p2-metadata) on project org.eclipse.m2e.wtp.jaxrs.feature: 
Execution attach-p2-metadata of goal 
org.eclipse.tycho:tycho-p2-plugin:0.21.0:p2-metadata failed. 
IllegalArgumentException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to 
execute goal org.eclipse.tycho:tycho-p2-plugin:0.21.0:p2-metadata 
(attach-p2-metadata) on project org.eclipse.m2e.wtp.jaxrs.feature: 
Execution attach-p2-metadata of goal 
org.eclipse.tycho:tycho-p2-plugin:0.21.0:p2-metadata 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:116)
         at 
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
         at 
org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
         at 
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
         at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
         at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
         at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
         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:483)
         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 
attach-p2-metadata of goal 
org.eclipse.tycho:tycho-p2-plugin:0.21.0:p2-metadata failed.
         at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
         at 
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
         ... 19 more
Caused by: java.lang.IllegalArgumentException
         at 
org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.getCanonicalArtifact(P2GeneratorImpl.java:156)
         at 
org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:109)
         at 
org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata(P2MetadataMojo.java:141)
         at 
org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute(P2MetadataMojo.java:102)
         at 
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
         ... 20 more
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eclipse-m2e-wtp.spec
Type: text/x-rpm-spec
Size: 2160 bytes
Desc: eclipse-m2e-wtp.spec
URL: <http://lists.fedoraproject.org/pipermail/java-devel/attachments/20150306/d9db4660/attachment.bin>


More information about the java-devel mailing list