felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barbara Rosi-Schwartz <Barbara.Rosi-Schwa...@iggroup.com>
Subject RE: Wrong version in uses clause generated by maven-bundle-plugin
Date Wed, 28 Sep 2011 10:42:39 GMT
Oops... ignorance dominates :-(

Thank you very much, Neil!

-----Original Message-----
From: Neil Bartlett [mailto:njbartlett@gmail.com] 
Sent: 28 September 2011 11:35
To: users@felix.apache.org
Subject: Re: Wrong version in uses clause generated by maven-bundle-plugin

Hi Barbara,

You're reading that clause slightly wrong. "Uses" clauses don't have versions… the version
clause is actually attached to the exported package, i.e. com.acne.jar2.dto.

Rgds
Neil



On Wednesday, 28 September 2011 at 11:30, Barbara Rosi-Schwartz wrote:

> Hello everyone.
>  
> I am using the maven-bundle-plugin to OSGi-ify some jars that I am using in my app. The
manifest file appears to be generated as expected, except for a uses clause in the Export-Package
element, which points to the wrong version of the used jar. Here's an example:
>  
> Import-Package: com.acne.jar1.dto;version="[1.4,2)"
> Export-Package: com.acne.jar2.dto;uses:="com.acne.jar1.dto";version=
>  "1.0.0.SNAPSHOT"
>  
> Where the jar containing the com.acne.jar1.dto package has been OSGi-ified and is at
version 1.4.0-SNAPSHOT.
>  
> Whilst the Import-Package element is generated correctly, the Export-Package has the
wrong version in the uses, the correct one should be 1.4.0-SNAPSHOT.
>  
> I have read in the documentation that versions are inferred from either the source jar
or packageinfo files contained in the source tree. I would prefer to avoid having to maintain
packageinfo files and to rely on automatic detection of the correct version.
>  
> How can I do this? If I cannot get the right version, can I safely suppress it? What
am I missing?
>  
> I am using maven-bundle-plugin version 2.3.5 and the manifest goal to generate the bundle
manifest, in order to keep the packaging element as "jar". However I have also tried the standard
usage of the plugin, with the packaging element as "bundle", but this has produced exactly
the same results.
>  
> TIA,
> B.
>  
>  
>  
> BARBARA ROSI-SCHWARTZ
> Senior Developer
>  
> IG Group|Cannon Bridge House
> 25 Dowgate Hill|London|EC4R ZYA
>  
> t: +44(0)20 7573 0208 (Direct)
> t: +44(0)20 7896 0011 (Switchboard)
> w: www.iggroup.com (http://www.iggroup.com)
>  
>  
> ________________________________
> The information contained in this email is strictly confidential and for the use of the
addressee only, unless otherwise indicated. If you are not the intended recipient, please
do not read, copy, use or disclose to others this message or any attachment. Please also notify
the sender by replying to this email or by telephone (+44 (0)20 7896 0011) and then delete
the email and any copies of it. Opinions, conclusions (etc) that do not relate to the official
business of this company shall be understood as neither given nor endorsed by it. IG Group
Holdings plc is a company registered in England and Wales under number 01190902. VAT registration
number 761 2978 07. Registered Office: Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA.
Authorised and regulated by the Financial Services Authority. FSA Register number 114059.

Mime
View raw message