import-package exact version in maven-bundle-plugin

View: New views
2 Messages — Rating Filter:   Alert me  

import-package exact version in maven-bundle-plugin

by Leen Toelen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
is there a way to specify to always import an exact version of a package
using maven-bundle-plugin. I know I can do it with ;version=${version} in
teh import statement, but I would like not to sepcify the version twice or
in a variable.

Regards,
Leen

Re: import-package exact version in maven-bundle-plugin

by Stuart McCulloch :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/10/15 Leen Toelen <toelen@...>

> Hi,
> is there a way to specify to always import an exact version of a package
> using maven-bundle-plugin. I know I can do it with ;version=${version} in
> teh import statement, but I would like not to sepcify the version twice or
> in a variable.
>

BND tries to detect the version of an imported package either via the
manifest
(if it's coming from a bundle on the classpath) or via the specification
version.
So the current version plays safe and leaves it unset (ie. match all
versions)
unless it has good evidence of the real version.

At the moment we don't have a way to tell it about the Maven artifact
version,
but that's not always a good guide of the actual package
version/compatibility.

If it is finding the version, but you're getting ranges and you want exact
versions
then look at the 'versionpolicy' setting
http://aqute.biz/Code/Bnd#versionpolicy


> Regards,
> Leen
>

--
Cheers, Stuart