Hi Markus,

we had this configuration (and in most modules still have it) in Aries.
The big problem is that if you setup for example an Import-Package in
the parent pom then you can not change it back to the default in a submodule. This caused a lot of problems in Aries. If you look into the links below you see how verbose the setup is and how easy it is to configure it wrong.

I also do not like the approach of using properties for OSGi configs as they are just arbitrary strings. So it is really easy to mess up. I think the maven-bundle-plugin uses pretty good defaults so the default config is a good start and tweaking the config per module as necessary
produces good results.

I have also looked a bit into the bnd-maven-plugin. I generally like the approach of being less invasive regarding the build. I have not used it in a bigger project though.


For reference this is the setup in Aries:
Properties
https://github.com/apache/aries/blob/trunk/parent/pom.xml#L184-L213
Baselining
https://github.com/apache/aries/blob/trunk/parent/pom.xml#L393-L410
Maven bundle plugin
https://github.com/apache/aries/blob/trunk/parent/pom.xml#L529-L557
One of the modules
https://github.com/apache/aries/blob/trunk/blueprint/blueprint-core/pom.xml#L48-L91


To compare. This is the setup of the jpa subproject.
Maven bundle plugin and baselining
https://github.com/apache/aries/blob/trunk/parent/pom.xml#L185-L213
One of the modules
https://github.com/apache/aries/blob/trunk/jpa/jpa-container/osgi.bnd

If you compare the two approaches you see how much simpler the setup with no big defaults and an extracted bnd file is in the jpa sub project. A small part of the simplicity comes from the bnd file extraction but the much bigger part comes from simply leaving the defaults.

Christian


On 12.02.2016 09:26, Markus Rathgeb wrote:
Hello,

some related questions:

You are talking about the bnd-maven-plugin (e.g. Neil Bartlett). I
recently read this pages:
* https://github.com/bndtools/bnd/issues/629
* https://github.com/bndtools/bndtools/wiki/Maven-Integration-Requirements
So, I would assume I should not move my projects to use that plugin.
Correct?

Could we collect pro and cons of he bnd.bnd files at some place?
The only pro I have read is loosing some lines.
This could also be done using a pre-configured maven-bundle-plugin in
the parent POM and using properties to change that stuff (see e.g.
https://github.com/ops4j/org.ops4j.pax.tipi/blob/master/tipi-master/pom.xml).
Or I am wrong?

Best regards,
Markus


--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
http://www.talend.com

Reply via email to