On Tue, Nov 17, 2009 at 9:51 AM, Vidar Ramdal <vi...@idium.no> wrote: > On Tue, Nov 17, 2009 at 8:34 AM, Felix Meschberger <fmesc...@gmail.com> wrote: > >> [...] >> If I change the API in the o.a.s.api.resource package, why would it make >> sense and make lives easier, if I upgrade the minor version number of >> the package o.a.s.api.request, too ? In fact, this makes life even >> harder for the end user: We have to upgrade the bundling implementing >> the request interface (if only to increase package import version) and >> we have to deploy the new bundle. Why ? Because the resource API was >> upgraded. Does not make any sense at all. This is not what OSGi is about. > > OK, but how often does that happen? > If a package is developed independently of other packages in the same > bundle, it sounds to me as if the package should be a bundle of its > own right?
A bundle is just a deployment unit - one can mix and match packages in a bundle as one sees fit. This boils down to the difference between Require-Bundle and Import-Package. In case of the former, I agree, versioning packages isn't that important but in the latter case, it is. However, I think there is another divider line which might be more interesting to look at namely, api v.s. implementation packages. In case of an api package it makes a lot of sense to version it independently along the lines of what Felix was suggesting. In case of implementation packages it might not be that important as they might change a lot and one would probably want a tighter coupling anyways -- hence, why not do the following: version api packages independently along the line of what Felix is suggesting version implementation packages based on the bundle version (and possibly make importers be hard coupled by using the symbolic-name requirement). I guess this is pretty much what Bertrand was suggesting too? However, regarding the burden on the user, notice, bnd will look for the package version when it generates the Import-Package clause so assuming the users use bnd or the maven-bundle-plugin then it shouldn't be that much of a problem for them as bnd can do the correct thing for them already as long as they tell it to do so via a versionpolicy of [${version;==;$...@}},${version;=+;$...@}}) for implementors as it creates e.g.: [1.2,1.3) [${version;==;$...@}},${version;+;$...@}}) for users as it creates e.g.: [1.2,2) regards, Karl > -- > Vidar S. Ramdal <vi...@idium.no> - http://www.idium.no > Sommerrogata 13-15, N-0255 Oslo, Norway > + 47 22 00 84 00 / +47 21 531941, ext 2070 > -- Karl Pauls karlpa...@gmail.com