On 07/09/07, Carlos Sanchez <[EMAIL PROTECTED]> wrote:
>
> I have a couple of concept questions for improvements to the bundle
> plugin manifest generation
>
> * Version resolution
> Let's say bundle A exports a package with version 2.0, and bundle B
> imports that package version 1.0
>
> When B is started, will it fail because A 1.0 is not present?


yes, unless another bundle provides version 1.0

Is the same behavior for Require-Bundle and Import-Package ?


yes

I guess if B imports [1.0,) then it'd work


yes - as long as version 2.0 is backwards compatible with 1.0 ;)

btw, take a look at http://www.aqute.biz/Code/Bnd#import-package
for how to use automatically detected versions (from the classpath)
with ranges in Bnd

* Optional packages
> If a bundle imports packages from several bundles A,B,C... but only
> one is required at runtime, will it work?


only if all packages are available at runtime

or should it explicitly say
> that they are optional (resolution:=optional) ?


yes, if only one will be available - or you could use DynamicImport-Package
(but if you know the packages up front, then imho Import-Package is better)

ie. commons-logging imports log4j, java logging,... but only on will
> likely be present at runtime
>
> https://svn.apache.org/repos/asf/felix/trunk/commons/commons-logging/pom.xml


yep - I typically mark those commons-logging dependencies as optional

Thanks


HTH

--
> I could give you my word as a Spaniard.
> No good. I've known too many Spaniards.
>                              -- The Princess Bride
>



-- 
Cheers, Stuart

Reply via email to