On Sat, Mar 13, 2010 at 3:57 PM, Stuart McCulloch <mccu...@gmail.com> wrote: > On 13 March 2010 21:04, Niall Pemberton <niall.pember...@gmail.com> wrote: > >> If I have, for example, a property defined in my maven settings.xml as >> follows: >> >> <settings> >> <profiles> >> <profile> >> <id>compile</id> >> <properties> >> <JAVA_1_3_HOME>C:\j\jdk1.3.1_18</JAVA_1_3_HOME> >> <JAVA_1_4_HOME>C:\j\jdk1.4.2_19</JAVA_1_4_HOME> >> <JAVA_1_5_HOME>C:\j\jdk1.5.0_01</JAVA_1_5_HOME> >> <JAVA_1_6_HOME>C:\j\jdk1.6.0_17</JAVA_1_6_HOME> >> </properties> >> </profile> >> </profiles> >> <activeProfiles> >> <activeProfile>v</activeProfile> >> </activeProfiles> >> </settings> >> >> Then the bundle-plugin will output those properties to the jar's >> MANIFEST.MF file... >> >> <snip> >> Manifest-Version: 1.0 >> Export-Package: .... >> JAVA_1_4_HOME: C:\j\jdk1.4.2_19 >> JAVA_1_6_HOME: C:\j\jdk1.6.0_17 >> JAVA_1_5_HOME: C:\j\jdk1.5.0_01 >> Tool: Bnd-0.0.238 >> Bundle-Name: Commons IO >> Created-By: 1.6.0_17 (Sun Microsystems Inc.) >> JAVA_1_3_HOME: C:\j\jdk1.3.1_18 >> ... >> </snip> >> >> Is there a way to avoid this? >> > > We automatically pass Maven properties onto the Bnd tool > so people can use them in their Bnd instructions / macros. > > As explained at http://aqute.biz/Code/Bnd, Bnd will copy all > properties that start with an upper-case letter to the manifest > > "The arguments to bnd are normal given as a set of properties. > Properties that begin with an upper case are copied to the > manifest (possibly after processing). Lower case properties > are used for macro variables but are not set as headers in the > manifest." > > You can tell Bnd to remove properties from the final manifest: > > -removeheaders LIST of string > "Removes the given headers from the output manifest" > > (taken from Bnd Directives part of http://aqute.biz/Code/Bnd) > > Remember this instruction will be <_removeheaders> if you > put it in the pom.xml, because XML tags can't start with a '-'
Thanks Stuart Niall > Thanks >> >> Niall >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@felix.apache.org >> For additional commands, e-mail: users-h...@felix.apache.org >> > > -- > Cheers, Stuart > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@felix.apache.org For additional commands, e-mail: users-h...@felix.apache.org