tycho
tycho copied to clipboard
Tycho does not handle multi-release OSGi bundles
I have fallen over the issue documented at https://bugs.eclipse.org/bugs/show_bug.cgi?id=542905
Eclipse and OSGi support multi-release OSGi bundles. In my case I've got a Java 9+ MANIFEST.MF that introduces package imports for javax.xml.bind. These imports are not present in the default MANIFEST.MF.
If I build this using an environment based on Java 8, all is good. If I build this using an environment based on Java 11, the compilation fails because the extra package import is not resolved.
package imports for javax.xml.bind. These imports are not present in the default MANIFEST.MF
javax.* package have to be imported also with pre java 9 so you better always import them if required.
If I build this using an environment based on Java 11, the compilation fails because the extra package import is not resolved.
can you provide a reproducer and/or more detailed error message?
@davenice are you still interested in this and maybe provide an integration-test to demonstrate the issue?
An example for a MR build can now be found here:
- https://github.com/eclipse-platform/eclipse.platform/pull/346
One complication is that we currently resolve for multiple platforms but we do not for multiple java versions also of course the classpath is only resolved once.
As Multi-Relase jar have a very limited scope (e.g. only import-package can change across versions), I think a pragmatic solution would be to simply query for the additional packages in the target platform and add the jars accordingly.