You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Reto Bachmann-Gmür <re...@apache.org> on 2013/02/14 11:58:26 UTC
Maven-bundle-plugin: specify import version range only for the case
the package is needed
Hello
Many bundles in my project but not all import a specific package. Whenever
this package is imported I have to specify the version range in the
Import-Package directive as it would otherwise be too restrictive. I would
like to specify this version range in the parent rather than in every
bundle-artifact individually. Obviously the import should only show up id
the package is indeed needed in that bundle project. Is this possible?
Cheers,
Reto
Re: Maven-bundle-plugin: specify import version range only for the case the package is needed
Posted by Stuart McCulloch <mc...@gmail.com>.
If the range is for a specific known package prefix, you could always use a wildcard:
<Import-Package>com.foo*;version="[1.0,2.0)", *</Import-Package>
then it would only be in the final manifest if a package under com.foo... was imported
Otherwise for general treatment of ranges, look at bnd's version policies:
http://www.aqute.biz/Bnd/Versioning
If this still doesn't meet your needs then an example project would be useful.
On 11 Apr 2013, at 19:37, Reto Bachmann-Gmür wrote:
> Maybe we should create a request for enhancement for this?
>
> Today, I was missing this feature again.
>
> On Thu, Feb 14, 2013 at 5:59 PM, Andrei Pozolotin <
> andrei.pozolotin@gmail.com> wrote:
>
>> I also would like to know the solution.
>>
>>
>> -------- Original Message --------
>> Subject: Maven-bundle-plugin: specify import version range only for the
>> case the package is needed
>> From: Reto Bachmann-Gmür <re...@apache.org> <re...@apache.org>
>> To: users <us...@felix.apache.org> <us...@felix.apache.org>
>> Date: Thu 14 Feb 2013 04:58:26 AM CST
>>
>> Hello
>>
>> Many bundles in my project but not all import a specific package. Whenever
>> this package is imported I have to specify the version range in the
>> Import-Package directive as it would otherwise be too restrictive. I would
>> like to specify this version range in the parent rather than in every
>> bundle-artifact individually. Obviously the import should only show up id
>> the package is indeed needed in that bundle project. Is this possible?
>>
>> Cheers,
>> Reto
>>
>>
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: Maven-bundle-plugin: specify import version range only for the
case the package is needed
Posted by Reto Bachmann-Gmür <re...@apache.org>.
Maybe we should create a request for enhancement for this?
Today, I was missing this feature again.
On Thu, Feb 14, 2013 at 5:59 PM, Andrei Pozolotin <
andrei.pozolotin@gmail.com> wrote:
> I also would like to know the solution.
>
>
> -------- Original Message --------
> Subject: Maven-bundle-plugin: specify import version range only for the
> case the package is needed
> From: Reto Bachmann-Gmür <re...@apache.org> <re...@apache.org>
> To: users <us...@felix.apache.org> <us...@felix.apache.org>
> Date: Thu 14 Feb 2013 04:58:26 AM CST
>
> Hello
>
> Many bundles in my project but not all import a specific package. Whenever
> this package is imported I have to specify the version range in the
> Import-Package directive as it would otherwise be too restrictive. I would
> like to specify this version range in the parent rather than in every
> bundle-artifact individually. Obviously the import should only show up id
> the package is indeed needed in that bundle project. Is this possible?
>
> Cheers,
> Reto
>
>
>
>
Re: Maven-bundle-plugin: specify import version range only for the
case the package is needed
Posted by Andrei Pozolotin <an...@gmail.com>.
I also would like to know the solution.
-------- Original Message --------
Subject: Maven-bundle-plugin: specify import version range only for the
case the package is needed
From: Reto Bachmann-Gmür <re...@apache.org>
To: users <us...@felix.apache.org>
Date: Thu 14 Feb 2013 04:58:26 AM CST
> Hello
>
> Many bundles in my project but not all import a specific package. Whenever
> this package is imported I have to specify the version range in the
> Import-Package directive as it would otherwise be too restrictive. I would
> like to specify this version range in the parent rather than in every
> bundle-artifact individually. Obviously the import should only show up id
> the package is indeed needed in that bundle project. Is this possible?
>
> Cheers,
> Reto
>