On 4/3/2010 5:14 AM, Tommaso Teofili wrote: > 2010/3/25 Marshall Schor <m...@schor.com> > > >> Seems like a reasonable approach (caveat: I'm not really up-to-date with >> the use-cases). >> >> Is it possible to factor out any (i.e., most) of the felix bundle plugin >> configuration into the parent pom? >> > > Good point Marshall. > I tried to do so but it seems the <configuration> tag cannot be defined > partially (something on the parent POM and something else inside the child > POM)
hmm, not sure why this didn't work for you. I was able to get something like this to work: I set up a trial set of poms - a parent and a child. In the parent I put the items that I wanted to be inherited in a <pluginManagement> element: <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <!-- version 1.4.0 to support _nouses instruction --> <version>1.4.0</version> <extensions>true</extensions> <configuration> <manifestLocation>META-INF</manifestLocation> <instructions> <_nouses>true</_nouses> <Import-Package>org.apache.uima,*</Import-Package> <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency> <Bundle-SymbolicName>org.apache.uima.bsf;singleton:=true</Bundle-SymbolicName> <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment> <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI> <Eclipse-BuddyPolicy>registered</Eclipse-BuddyPolicy> </instructions> </configuration> </plugin> </plugins> </pluginManagement> </build> In the child I put the items that were specific to that one child: <build> <finalName>org.apache.uima.bsf_${uimaj-release-eclipse-version}</finalName> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <configuration> <instructions> <Export-Package>org.apache.uima.annotator.bsf.*</Export-Package> <Bundle-SymbolicName>org.apache.uima.bsf;${singleton}</Bundle-SymbolicName> </instructions> </configuration> </plugin> </plugins> </build> Then, when I did mvn help:effective-pom on the child it showed that the parent configuration was successfully merged with the child result: <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>1.4.0</version> <extensions>true</extensions> <configuration> <instructions> <Export-Package>org.apache.uima.annotator.bsf.*</Export-Package> <Bundle-SymbolicName>org.apache.uima.bsf;${singleton}</Bundle-SymbolicName> <_nouses>true</_nouses> <Import-Package>org.apache.uima,*</Import-Package> <Embed-Dependency>*;scope=compile;inline=true</Embed-Dependency> <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment> <Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI> <Eclipse-BuddyPolicy>registered</Eclipse-BuddyPolicy> </instructions> <manifestLocation>META-INF</manifestLocation> </configuration> </plugin> > so I thought using Maven properties could be a solution in order to > define some fixed values for <configuration> inside the parent POM. > > Parent POM: > <properties> > <import-package>org.apache.uima,*</import-package> > <embed-dependency>*;scope=compile;inline=true</embed-dependency> > <singleton>singleton:=true</singleton> > <jre>J2SE-1.5</jre> > <ext-api>true</ext-api> > <buddy-policy>registered</buddy-policy> > <nouses>true</nouses> > <manifest-location>META-INF</manifest-location> > </properties> > > Inside the child POM only Export-package and Bundle-SymbolicName are > defined: > ... > <configuration> > <manifestLocation>${manifest-location}</manifestLocation> > <instructions> > <_nouses>${nouses}</_nouses> > <Export-Package>org.apache.uima.lucas.*</Export-Package> > <Import-Package>${import-package}</Import-Package> > <Embed-Dependency>${embed-dependency}</Embed-Dependency> > > <Bundle-SymbolicName>org.apache.uima.lucas;${singleton}</Bundle-SymbolicName> > > > <Bundle-RequiredExecutionEnvironment>${jre}</Bundle-RequiredExecutionEnvironment> > <Eclipse-ExtensibleAPI>${ext-api}</Eclipse-ExtensibleAPI> > <Eclipse-BuddyPolicy>${buddy-policy}</Eclipse-BuddyPolicy> > </instructions> > </configuration> > .. > > Waiting for your comments about it. > Tommaso > > P.S.: > In Apache Clerezza the AlchemyAPI and OpenCalais annotators are used at this > moment to enable auto tagging of resources. > Great! :-) -Marshall