directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Request for slf4j import package in API bundles changes
Date Wed, 15 Apr 2015 07:39:40 GMT
Le 15/04/15 08:43, Stefan Seelmann a écrit :
> On 04/08/2015 10:57 PM, Benjamin Abernathy wrote:
>> Stefan,
>>
>> I think I have found a reasonable solution. I implemented it and it
>> passes the integration tests as well as solves the problem I am
>> experiencing in OSGi. Here is what I did.
>>
>> 1. I updated the parent pom by adding the following properties:
>>
>>     <slf4j.api.version.min>1.7</slf4j.api.version.min>
>>     <slf4j.api.version.max>1.8</slf4j.api.version.max>
>>
>> 2. Then in each child pom that had an import declaration for org.slf4j,
>> I changed the import statement from:
>>
>> org.slf4j;version=${slf4j.api.version},
>>
>> to: 
>>
>> org.slf4j;version="[${slf4j.api.version.min},${slf4j.api.version.max})",
>>
>>
>> This approach has some drawbacks:
>>
>> 1. You now have three places that may need to be updated when the
>> version of slf4j is updated. 
>> 2. BND (which is called by maven-bundle-plugin) is not the one deciding
>> the what version should be used.
>>
>> Now, supposedly BND can choose a version range, but I could not get
>> consistent behavior from the build using that approach.
> You mean the following? I tried to use BND range macro which magically
> works:
>
>     org.slf4j;version="$«range;[==,=+)»",
>
> The result in mainifest is then org.slf4j;version="[1.7,1.8)"
>
> But I didn't find lot of documenation why it works. 

The best documentation on ranges is probably this page :
http://bnd.bndtools.org/chapters/850-macros.html


Mime
View raw message