Another point which I don't think is handled yet afaik is leveraging
the maven metadata for optional flag and provided dependency to help
the generation of package imports.
At least, the optional one should be quite easy to handle, however, I
don't think bnd has any help for that, and we'd need the maven
metadata anyway, so it may be better suited in the bundle plugin for
generating the default import package.    Not sure how to leverage the
provided / runtime scope, as i don't think the semantic is really
clear ...

On Tue, Nov 16, 2010 at 10:07, Guillaume Nodet <gno...@gmail.com> wrote:
> I'd like to improve the maven bundle plugin to make it very easy to
> actually create good bundles for people that have had limited exposure
> to OSGi.
> I think in such cases, we should have something like the following:
>   * export all the packages from the src/main/java (this is done by
> default by the plugin if nothing is specified, but there's no way to
> add things without having to list all the packages again)
>   * use the pom version for the version of the exported packages
>   * do not import exported packages by default (most of the projects
> i've worked with do not use api + impl in the same bundle)
>   * use default version ranges for third party libraries
>   * use a stricter version range for packages imported from the same
> build (i.e. if you have two bundles build in the same build, they will
> import packages using a stricter version range)
>
> Before you try to shoot me down, I do understand this is not the best
> way to create bundles, and ideally, the version of the packages would
> be different than the overall version of the system, but I think a lot
> of projects aren't prepared to have OSGi have such a big impact on
> their code (as OSGi is for them a side thing).   So for those, I'd
> still like to have a set of defaults that works better than the
> current default (which has no version on the packages, does not use
> version ranges, etc...).
>
> I'm not sure how to do that yet, maybe having a simple option that
> activate different profiles if people think this should not be the
> overall defaults.  I haven't given much thoughts about the technical
> aspect yet, but I do think we should make it easier to package OSGi
> bundles.
>
> Also maybe a different profile to package an existing jar into a
> bundle more easily would be good too.
>
> THoughts ?
>
> --
> 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