On 3 Feb 2012, at 21:09, Andreas Jansson wrote: > Hi all, > > I have noticed an odd behavior with the maven-bundle-plugin (using v.2.3.6) > that all system property that are set with upercase first letter as directly > injected into the manifest. For example I run this: > > mvn -DFOO=bar install > > And that causes my META-INF/MANIFEST.MF contains a FOO=bar property. If I > instead use -Dfoo=bar the same problem does not occur. My guess is that the > bundle plugin just forwards all properties to bnd, which will think this is a > normal manifest header.
Yes, all properties see by Maven are forwarded onto bnd so people can reference them in bnd instructions or macros - and by default bnd adds any property that starts with an upper-case letter to the manifest You can tell bnd to remove headers using -removeheaders: Foo, Bar, Example in your osgi.bnd file, or <_removeheaders>Foo, Bar, Example</_removeheaders> in your pom.xml file - see http://www.aqute.biz/Bnd/Format > I guess most people won't even notice this since system propperties are > generally lower case, but in our build environment there are a lot of these > properties that unfortunately use upper case so my manifest files are all > cluttered with all kinds of strange headers. > > My question is if there is a way to suppress it? Note that I can not easily > change the system properties that are already set. > Also is there some intention behind this behavior, or simply a bug that can > be address in a future version? We don't know what properties someone might use in their instructions/macros, so we just forward everything onto bnd - if you have any idea to trim down this list without affecting users feel free to attach a patch to JIRA Alternatively, if you have a suggested improvement for bnd (such as an option to only add the OSGi headers, or maybe a whitelist of acceptable headers) then feel free to raise this on https://github.com/bndtools/bnd > Thanks, > Andreas > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@felix.apache.org > For additional commands, e-mail: users-h...@felix.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org