felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy Jefferson <li...@datanucleus.org>
Subject Re: Felix Maven2 "bundle" plugin : problem with version ranges
Date Wed, 25 May 2011 15:21:36 GMT
> Peter Kriens replied
> The problem is that if you compile against 3.1 then you likely dependn on 3.1. 
> The code you compile against influences the byte codes of your generated class 
> files, availability of methods etc. So imho you can never get an import range 
> that starts with a version that is lower to what you compiled with. Anyway, in 
> your POM you specified a range, which part of the range gets picked should then 
> not be of your concern. If you want to be in control, specify the exact version.
Not in this case. I compile against 3.1, yes. But I can run against 3.0, aka 
backwards compatibility. So in the same way someone can import the 3.0 bundle 
of javax.jdo and run with that in an OSGi environment, not just using what I 
compiled against.


> Obviously you can override it with bnd's Import-Package statement, the 
> automatic stuff is only done when no version is specified on an import.
Yes, but then I have to specify things in two places that the version range is 
XXX - once for Maven and once for the OSGi MANIFEST.MF, and I was hoping your 
nice plugin had made my job much simpler ;-) No problem, i'll continue doing 
it manually, but I'd suggest that it ought to be an aim of the plugin (whether 
in this version, or for the future) to provide for such situations, otherwise 
it is only of use for very simple cases.

Thanks.

Regards
-- 
Andy

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message