Open kwin opened 7 years ago
Newer versions of the maven-bundle-plugin
should only give a version for exported packages in case there has been an explicit version information given in the package-info.java
(compare with https://issues.apache.org/jira/browse/FELIX-5172 and http://www.mail-archive.com/osgi-dev@mail.osgi.org/msg01514.html).
Right now the
maven-bundle-plugin
will automatically add the project version for each of the exported packages: https://github.com/amaembo/jsr-305/blob/master/ri/pom.xml#L94. This was changed with version 3.0.1. That is a problem when using this in an OSGi context, because the using bundles automatically have a dependency to e.g.javax.annotation
in version [3,4). That is usually not resolvable as those annotations are not deployed in an OSGi container. But sincejavax.annotation
is part of the JRE your system bundle exports the packagejavax.annotation
in a JRE-specific version. Since the annotations are usually not required at run time I would recommend to not explicitly specify a version in theExport-Packages
header and through this allow this dependency to be resolved by the system bundle.