Hi All,
I’m unable to get tycho to build a bundle that has Java 7 specified in the manifest’s execution environment.
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
The Java on my path is Java 7, the bundle builds correctly within Eclipse’s PDE. The problem doesn’t occur if I use JavaSE-1.6 or less (though some files fail to compile as I’m using new nio features).
Tycho 0.14.0 gives me this error:
[INFO] Computing target platform for MavenProject: foo:test:1.0.0-SNAPSHOT @ /users/is/jblackburn/workspaces/pydev/test/pom.xml
[INFO] Resolving dependencies of MavenProject: foo:test:1.0.0-SNAPSHOT @ /users/is/jblackburn/workspaces/pydev/test/pom.xml
[INFO] Resolving class path of MavenProject: foo:test:1.0.0-SNAPSHOT @ /users/is/jblackburn/workspaces/pydev/test/pom.xml
[ERROR] Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle test cannot be resolved
[ERROR] Resolution errors:
[ERROR] Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
[ERROR] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle test cannot be resolved
Resolution errors:
Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: org.osgi.framework.BundleException: Bundle test cannot be resolved
Resolution errors:
Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:252)
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.resolveClassPath(OsgiBundleProject.java:158)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:111)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:61)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 11 more
Caused by: org.osgi.framework.BundleException: Bundle test cannot be resolved
Resolution errors:
Bundle test - Missing Constraint: Bundle-RequiredExecutionEnvironment: JavaSE-1.7
at org.eclipse.tycho.core.osgitools.EquinoxResolver.assertResolved(EquinoxResolver.java:280)
at org.eclipse.tycho.core.osgitools.EquinoxResolver.newResolvedState(EquinoxResolver.java:69)
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.getResolverState(OsgiBundleProject.java:250)
... 16 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorException
Does anyone know how can I influence the RequiredExecutionEnvironment?
Cheers,
James