Should Maven and Target Platform package versions match?

I’ve come across something which I think is a bug, perhaps in the Maven artifacts.

I’m making an OSGi application, which uses servlets. I created the OSGi project from the Maven archetype for Liberty OSGi-enabled Web 3.1 projects, so it’s using `maven-bundle-plugin` to build the manifest.

My Target Platform in Eclipse (+WDT) is set up to point to my Liberty installation. Equally, my `pom.xml` has a dependency on ``.

The IDE does the Maven build of the `pom.xml` into the generated `MANIFEST.MF`. However, there’s a problem. The `MANIFEST.MF` is generated with the following statement:

Note that the imports are at version 3.1 and higher, because that’s the version found in Maven. However, the Target Platform bundle `` exports those packages at version 2.7.

This results in the tooling breaking – I get errors in the `MANIFEST.MF` in the IDE – but worse, of course, the `Import-Package` statements are not available in the runtime, and the application will not start.


Leave a Reply