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 <me...@farewellutopia.com> on 2011/12/01 16:11:28 UTC

omit version in import statement

Hello

How do I get the felix maven bundle plugin to omit the version number
in the import -package directive even though the dependency exports
the package with a version number?

The problem is that I'm compiling against jsr-311 api bundle which
exposes version number and running against an implementation that
doesn't provide version number in the export.

Cheers,
Reto

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: omit version in import statement

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 01.12.2011 um 16:11 schrieb Reto Bachmann-Gmür:

> Hello
> 
> How do I get the felix maven bundle plugin to omit the version number
> in the import -package directive even though the dependency exports
> the package with a version number?
> 
> The problem is that I'm compiling against jsr-311 api bundle which
> exposes version number and running against an implementation that
> doesn't provide version number in the export.

You might have expected this, but anyway: The fix is to fix the used bundle not yours ;-)

One solution would be to compile against the same JAR that is also deployed. Another option might be to fix the version import number to 0.0.0:

   some.pkg;version=0.0.0

Again, I think this will break your bundle over time because it dismisses an important feature of OSGi.

Regards
Felix
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org