Hi,
I am trying to add the following directive to my persistence bundles
Manifests in order to refer to gemini jpa as precondition.
Require-Capability: osgi.extender;
filter:="(&(osgi.extender=osgi.jpa)(provider=org.eclipse.gemini.jpa))"
In Eclipse this works flawless. However trying to compile with tycho
yields in the following error stacktrace:
org.apache.maven.InternalErrorException: Internal error:
java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle
com.here.phoenix.target.engine.jpa.model cannot be resolved
Resolution errors:
Bundle com.here.phoenix.target.engine.jpa.model - Missing Constraint:
Require-Capability: osgi.extender;
filter="(&(osgi.extender=osgi.jpa)(provider=org.eclipse.gemini.jpa))"
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:166)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
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: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: java.lang.RuntimeException:
org.osgi.framework.BundleException: Bundle
com.here.phoenix.target.engine.jpa.model cannot be resolved
Resolution errors:
Bundle com.here.phoenix.target.engine.jpa.model - Missing Constraint:
Require-Capability: osgi.extender;
filter="(&(osgi.extender=osgi.jpa)(provider=org.eclipse.gemini.jpa))"
at
org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:254)
at
org.eclipse.tycho.core.osgitools.OsgiBundleProject.resolveClassPath(OsgiBundleProject.java:155)
at
org.eclipse.tycho.core.resolver.DefaultTychoResolver.resolveProject(DefaultTychoResolver.java:120)
at
org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:75)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:310)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
... 11 more
Caused by: org.osgi.framework.BundleException: Bundle
com.here.phoenix.target.engine.jpa.model cannot be resolved
Resolution errors:
Bundle com.here.phoenix.target.engine.jpa.model - Missing Constraint:
Require-Capability: osgi.extender;
filter="(&(osgi.extender=osgi.jpa)(provider=org.eclipse.gemini.jpa))"
at
org.eclipse.tycho.core.osgitools.EquinoxResolver.assertResolved(EquinoxResolver.java:284)
at
org.eclipse.tycho.core.osgitools.EquinoxResolver.newResolvedState(EquinoxResolver.java:73)
at
org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:252)
... 16 more
For provided capabilities tycho has no problems it is always just on the
Require side.
This is a bug and it would be great if it could get fixed because
otherwise we will have to create a workaround script which extracts all
archives and adds the directive after the maven build.
Regards
David