felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Bartlett <njbartl...@gmail.com>
Subject Re: Roadmap for maven bundle plugin?
Date Mon, 09 Nov 2015 19:39:57 GMT
Thanks for the suggestions Christian. I may indeed write a blog post. In the meantime, you
can place this in the bnd.bnd of your parent project:

	-exportcontents: ${packages;ANNOTATED;org.osgi.annotation.versioning.Version}

This exports any packages that have the @Version annotation on their package-info. Incidentally,
OSGi R7 is likely to add a standard @Export annotation that bnd will recognise without the
need for a macro.

Regarding Embed-Dependency — I know that embedding JARs is sometimes necessary. This is
still possible with bnd-maven-plugin, you just need to declare Bundle-ClassPath, which is
an OSGi header like any other. In my opinion Embed-Dependency just makes this process too
easy and thoughtless. Beginners get the impression that this is “the right way” to do
things and they end up creating an enormous mess.

I know that we can’t always prevent people from shooting themselves in the foot… but we
shouldn’t provide a loaded gun to people without firearms experience.


> On 9 Nov 2015, at 18:58, Christian Schneider <chris@die-schneider.net> wrote:
> Thanks for the clarifications.
> I personally like the external bnd.bnd files. They are more concise than xml configs.
> You should maybe write a blog entry about the annotations and also the parent configs.
I liked the way you generically set up the exports based on the version annotations but forgot
how to do it exactly.
> I am not sure about embed dependency. Personally I normally do not use it but it is used
in quite some places. So it would be important to check what these people try to achieve with
the embed and if the same can be done without.
> It would be a shame to have to mix both maven plugins in bigger projects.
> Christian
> Am 09.11.2015 um 18:36 schrieb Neil Bartlett (Paremus):
>> Just addressing a couple of points made on this list.
>> Yes, we support only instructions in the separate bnd.bnd file (currently). However
with judicious use of Java annotations, we find that you very rarely need bnd instructions
at all! However I don’t agree that this is the "biggest difference" between bnd-maven-plugin
and maven-bundle-plugin… The biggest differences are: (a) no special packaging type, and
(b) no magic/implicit exports.
>> The licence of bnd-maven-plugin is Apache. However since bnd-maven-plugin is part
of the bnd project, it is released at the same time as any enhancements made to bnd. This
helps people who want to use the very latest bnd features.
>> @Benson: There are no plans to implement Embed-Dependency, and I would oppose any
move to do so since I think it’s such a terrible idea.
>> Regards,
>> Neil

View raw message