Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
scr bnd plugin 1.0.0, scr bnd plugin 1.1.0
-
None
Description
Using the scr bnd plugin inside maven-bundle-plugin fails with java.lang.NoSuchMethodError: aQute.bnd.osgi.Verifier.isStrict()Z
(full pom.xml attached)
<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.5.0</version> <extensions>true</extensions> <configuration> <instructions> <_plugin>org.apache.felix.scrplugin.bnd.SCRDescriptorBndPlugin</_plugin> </instructions> </configuration> <dependencies> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.scr.bnd</artifactId> <version>1.1.0</version> </dependency> </dependencies> </plugin>
Root cause is that scr-bnd plugin includes an incompatible version of bndlib (2.1.0) while maven-bundle-plugin 2.5.0 is using bndlib 2.3.0. In the maven context, scr-bnd plugin is first in the class path and so, its embedded version of bndlib wins.
Probably scr-bnd plugin should not include a version of bndlib at all, but expect it to be provided by the caller of the plugin.
workaround
add a dependency on bndlib before scr-bnd plugin:
<plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.5.0</version> <dependencies> <dependency> <groupId>biz.aQute.bnd</groupId> <artifactId>bndlib</artifactId> <version>2.3.0</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> <artifactId>org.apache.felix.scr.bnd</artifactId> <version>1.1.0</version> </dependency> </dependencies> </plugin>
Attachments
Attachments
Issue Links
- relates to
-
FELIX-5074 Using org.apache.felix.scr.bnd together with maven-bundle-plugin leads to using the wrong bnd version
- Closed