You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stuart McCulloch (JIRA)" <ji...@apache.org> on 2014/11/27 01:14:12 UTC
[jira] [Commented] (FELIX-4626) maven-bundle-plugin does not insert
package range to Import-Package clause
[ https://issues.apache.org/jira/browse/FELIX-4626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14227034#comment-14227034 ]
Stuart McCulloch commented on FELIX-4626:
-----------------------------------------
Actually I can recreate the same issue using https://github.com/everit-org/cache-noop and maven-bundle-plugin 2.4.0 just by changing the version of bnd.
For example, with bnd explicitly set to 2.2.0 the manifest contains the correct versions:
{code}
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.4.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>org.everit.osgi.cache.noop.internal.NoOpCacheActivator</Bundle-Activator>
</instructions>
</configuration>
<dependencies>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
<version>2.2.0</version>
</dependency>
</dependencies>
</plugin>
{code}
{code}
Import-Package: org.everit.osgi.cache;version="[2.0,3)",org.osgi.framework;version="[1.6,2)"
{code}
Just by upgrading bnd to 2.4.0, and not changing the maven-bundle-plugin version, the import version goes missing:
{code}
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.4.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>org.everit.osgi.cache.noop.internal.NoOpCacheActivator</Bundle-Activator>
</instructions>
</configuration>
<dependencies>
<dependency>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bndlib</artifactId>
<version>2.4.0</version>
</dependency>
</dependencies>
</plugin>
{code}
{code}
Import-Package: org.everit.osgi.cache,org.osgi.framework;version="[1.6,2)"
{code}
So something appears to have changed in the way bnd processes the instructions and classpath supplied by maven.
> maven-bundle-plugin does not insert package range to Import-Package clause
> --------------------------------------------------------------------------
>
> Key: FELIX-4626
> URL: https://issues.apache.org/jira/browse/FELIX-4626
> Project: Felix
> Issue Type: Bug
> Affects Versions: maven-bundle-plugin-2.5.0
> Reporter: Balazs Zsoldos
>
> With maven-bundle-plugin 2.4.0 everything is ok:
> {code}
> Import-Package: org.everit.osgi.cache;version="[2.0,3)",org.osgi.framewo rk;version="[1.6,2)"
> {code}
> With version 2.5.0 the header is the following:
> {code}
> Import-Package: org.everit.osgi.cache,org.osgi.framework;version="1.6,2)"
> {code}
> The version range from org.everit.osgi.cache package is missing.
> __To reproduce:__
> - Check out the repository https://github.com/everit-org/cache-noop
> - Replace the version of maven-bundle-plugin from 2.4.0 to 2.5.0.
> The sample project and its dependency has 1-1 package.
> I created an issue for bndlib but I got the response that this might be a bug of maven-bundle-plugin.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)