Or maybe to avoid this problem, what about enhancing the
maven-bundle-plugin so that when the same package is exported and
imported, a strict import is used.
This would end up with the following by default:

 foo-1.0:
 Export-Package: a;version="1.0"
 Import-Package: a;version="[1.0,1.0]"

 foo-2.0:
 Export-Package: a;version="2.0"
 Import-Package: a;version="[2.0,2.0]"

This is quite difficult to achieve right now if you use the
<_versionpolicy/> config parameter, as all versions will be overriden.
This may require some changes in bnd though...

On Fri, Jun 19, 2009 at 13:39, Guillaume Nodet<[email protected]> wrote:
> Let's say we have two bundles
>
> foo-1.0:
> Export-Package: a;version="1.0"
> Import-Package: a;version="1.0"
>
> foo-2.0:
> Export-Package: a;version="2.0"
> Import-Package: a;version="2.0"
>
> In felix (trunk), if you install foo-2.0, then foo-1.0, you end up with:
>
> foo-2.0:
> Export-Package: a;version="2.0"
>
> foo-1.0:
> Import-Package: a;version="2.0"
>
> This really looks ackward (and will mostly lead to failures if the
> major versions are not really compatible), though I haven't seen
> anything in the core spec to forbid this.
> Section 3.7 says that the resolution for foo-1.0 should either choose
> an external package (which is what done here) or an internal package.
>
> Equinox seems to handle it using an internal package.
>
> What would you think about changing the resolution algorithm so that
> it try to use an internal package instead of an external package if
> all the constraints are met ?
>
>
>
>
>
> --
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> ------------------------
> Open Source SOA
> http://fusesource.com
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/
------------------------
Open Source SOA
http://fusesource.com

Reply via email to