You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Timo Naroska (JIRA)" <ji...@apache.org> on 2014/07/18 15:43:04 UTC

[jira] [Created] (FELIX-4567) scr bnd plugin incompatible with maven-bundle-plugin 2.5.0

Timo Naroska created FELIX-4567:
-----------------------------------

             Summary: scr bnd plugin incompatible with maven-bundle-plugin 2.5.0
                 Key: FELIX-4567
                 URL: https://issues.apache.org/jira/browse/FELIX-4567
             Project: Felix
          Issue Type: Bug
          Components: SCR Tooling
    Affects Versions: scr bnd plugin 1.1.0, scr bnd plugin 1.0.0
         Environment: Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 14:51:28+0100)
Java version: 1.7.0_51, vendor: Oracle Corporation
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.4", arch: "x86_64", family: "mac"
            Reporter: Timo Naroska


Using the scr bnd plugin inside maven-bundle-plugin fails with {{java.lang.NoSuchMethodError: aQute.bnd.osgi.Verifier.isStrict()Z}}
(full pom.xml attached)

{code:xml}
      <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>
{code}

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:

{code:xml}
      <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>
{code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)