Hi Stefan I agree with your goals, but I think that *should* be possible with the bnd-maven-plugin. Recently I looked into the source of the plugin and the documentation suggests that you need to use either bnd instructions in the pom or a bnd-file (in my understanding that is per maven module). The instructions from a parent pom are then merged using custom logic, see [0]. Maybe reading the implementation of "loadProperties"[1] helps get you unstuck?
Regards Julian [0] https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L138-L150 [1] https://github.com/bndtools/bnd/blob/master/maven/bnd-maven-plugin/src/main/java/aQute/bnd/maven/plugin/BndMavenPlugin.java#L479-L488 On Fri, Nov 1, 2019 at 11:49 AM Stefan Seifert <sseif...@pro-vision.de> wrote: > > additionally to the problems with the bnd baseline maven plugin I'm a bit > happy with the way to express project-level bnd instructions with the > bnd-maven-plugin, encountered on the branch [1]. > > 1. basically the bnd maven plugin supports both bnd.bnd file and > configuration via bnd config parameter in the POM (although the latter is not > recommended). > - i know the bnd people have their own special view on POM files and XML file > format and try to put everything outside the POM > - i personally prefer to have those instructions all in the POM, e.g. they > are then easily detectable also for uploaded libraries with their POM on > maven central (and not only in the source jar) > - in general it does not seem to be possible to define a "chain" of parts of > bnd configurations in multiple parent poms, each contributing some aspect > - unlike the maven-bundle-plugin there is only a single "bnd" configuration > parameter (we are using it in sling-bundle-parent), and it does not seem to > possible to define additional instructions in the local POM > - or i did something wrong when trying it > - especially if there are multiple parent POMs involved this seems to be a > big restriction for me > > 2. sometimes a module has some complex instructions which need line-by-line > comments to know the reason why they are there > - see [2] for example in caconfig-impl > - this is no longer possible in a bnd file because it breaks the multi line > syntax with \ in the line endings > - so i ended up collecting the comments above the instructions [3], but this > is not a good replacement > - is there a better solution? > > 3. i would like to have back an XML-structured way of defining bnd > instructions as it was the case in maven-bundle-plugin in bnd-maven-plugin! > - this was easy to document > - and it nicely followed the maven-ways of inheriting and overwriting > individual parameters > > stefan > > [1] > https://github.com/apache/sling-org-apache-sling-caconfig-impl/tree/feature/SLING-8824-parent25 > [2] > https://github.com/apache/sling-org-apache-sling-caconfig-impl/blob/67fe5f95fe35665c30d95302264941715dcc8b60/pom.xml#L51-L59 > [3] > https://github.com/apache/sling-org-apache-sling-caconfig-impl/blob/5cf6a823255434c323060cf50ec51400d57499cd/bnd.bnd#L1-L8 > >