I want to let maven to create the header field Require-Bundle depending on my dependencies specified in the pom.xml.
I looked into the maven-jar-plugin but it does only support generation of the ClassPath header.
Does anyone know a maven plugin that can automatically generate the RequireBundle entry in the manifest out of my pom dependencies of scope provided?
Best regards
You should use the maven-bundle-plugin.
ADDENDUM:
More precisely, maven-bundle-plugin would only assist you when defining the dependencies of your bundle. It would not automatically construct a set of required bundles. This is because requiring bundles is not the recommended OSGi practice: you should depend on exported packages. For this reason, maven-bundle-plugin automatically fills the Import-Package, but would not do the same for Require-Bundle (either one or the another, anyway). Hence if you choose to take this road, you’ll have to specify bundles manually anyway.
This does not count as a solution, but I thought it worth of discussion.