bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
525 stars 304 forks source link

Provide OpenRewrite recipe to "bndnize" a maven project #5834

Closed laeubi closed 8 months ago

laeubi commented 9 months ago

It would be great to have a recipe to "bndnize" a maven project:

https://docs.openrewrite.org/recipes/maven

I think especially the case of less intrusive usage is using bnd-process-goal as this works best for any existing maven project, a recipe then should do the following:

  1. Add the bnd-maven-plugin to the build
  2. Adjust the maven-jar-plugin configuration
  3. create an (in the pom) bnd instruction to export all packages starting with the projects base package

This will give a first very easy to apply thing to add OSGi metadata to projects and increase the visibility of such opportunity.

stbischof commented 9 months ago

Moving Export package Instruktion to annitations.

laeubi commented 9 months ago

Moving Export package Instruktion to annitations.

If the project has no manifest there is nothing to move really.... and adding allot of new stuff to an existing project often adds some kind of resistance to accept the change and is prone to rotten over time, therefore I'd like to suggest to use the less intrusive style possible.

pkriens commented 9 months ago

Is this followed up by a PR or should we move it to abeyance until someone picks it up?