[ 
https://issues.apache.org/jira/browse/FELIX-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628993#action_12628993
 ] 

Sahoo commented on FELIX-549:
-----------------------------

Stuart,

It was my mistake. In my test case (refer to my previous comment), A2 exports p 
with version 0.3.18 instead of 0.3.19-SNAPSHOT. In A1, I see the Import-Package 
as 0.3 only. BND document as shown below suggests that it should be 0.3.18:
"During processing, bnd will attempt to find the exported version of imported 
packages. If no version or version range is specified on the import 
instruction, the exported version will then be used though the micro part and 
the qualifier are dropped. That is, when the exporter is 1.2.3.build123, then 
the import version will be 1.2.3."

I am attaching a simple test case (Felix-549.zip). In the test case. The 
relevant portion of generated manifest for both the artifacts are given below:

A2/target/classes/META-INF/MANIFEST.MF 
----------------------------------------------------------
Import-Package: p;version="0.3.18"
Export-Package: p;version="0.3.18"

A1/target/classes/META-INF/MANIFEST.MF 
-----------------------------------------------------------
Import-Package: org.osgi.framework;version="1.3",p;version="0.3"

So, I still think it is a bug. 

Thanks,
Sahoo

> Import-Package should not include "snapshot" from snapshot dependencies 
> ------------------------------------------------------------------------
>
>                 Key: FELIX-549
>                 URL: https://issues.apache.org/jira/browse/FELIX-549
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-1.4.0
>            Reporter: musachy
>            Priority: Minor
>             Fix For: maven-bundle-plugin-1.6.0
>
>
> I have a jar named:
> struts2-core-2.1.3-SNAPSHOT
> and a bundle that depends on it (imported with "compile" scope). The pom 
> section in the bundle is:
>                       <plugin>
>                               <groupId>org.apache.felix</groupId>
>                               <artifactId>maven-bundle-plugin</artifactId>
>                               <extensions>true</extensions>
>                               <version>1.4.0</version>
>                               <configuration>
>                                       <instructions>
>                                               
> <manifestLocation>META-INF</manifestLocation>
>                                               <Export-Package>
>                                                       
> org.apache.struts2.osgi.admin*
>                                               </Export-Package>
>                                               
> <Import-Package>*,com.opensymphony.xwork2</Import-Package>
>                                               <Bundle-Activator>
>                                                       
> org.apache.struts2.osgi.admin.MyBundleActivator
>                                               </Bundle-Activator>
>                                       </instructions>
>                               </configuration>
>                       </plugin>
> The generated Import-Package is:
> Import-Package: org.apache.struts2.dispatcher; version="2.1.3.SNAPSHOT"
> Which prevents the package from being resolved. (I tried exporting it as 
> "2.1" and "2.1.3.SNAPSHOT"). The default Maven2OsgiConverter just converts 
> "-" to "." and leaves "SNAPSHOT" in place.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to