You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ni...@apache.org on 2008/03/04 16:28:16 UTC
svn commit: r633514 - /commons/proper/commons-parent/trunk/pom.xml
Author: niallp
Date: Tue Mar 4 07:28:15 2008
New Revision: 633514
URL: http://svn.apache.org/viewvc?rev=633514&view=rev
Log:
Use the maven-bundle-plugin "manifest" goal to generate the MANIFEST.MF file and configure the maven-jar-plugin to use the generated MANIFEST.MF.
The main advantage of this is that *normal* manifest entries come first and retain their order, with the OSGi entries being appended after. It also means that the component poms don't need to specify <packaging>bundle</packaging>. Ovrriding the "commons.manifestfile" property with an alternative (or blank) manifest file can be used to omit OSGi manifest entries being added.
Modified:
commons/proper/commons-parent/trunk/pom.xml
Modified: commons/proper/commons-parent/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/commons-parent/trunk/pom.xml?rev=633514&r1=633513&r2=633514&view=diff
==============================================================================
--- commons/proper/commons-parent/trunk/pom.xml (original)
+++ commons/proper/commons-parent/trunk/pom.xml Tue Mar 4 07:28:15 2008
@@ -219,6 +219,7 @@
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
+ <manifestFile>${commons.manifestfile}</manifestFile>
<manifestEntries>
<Specification-Title>${project.name}</Specification-Title>
<Specification-Version>${project.version}</Specification-Version>
@@ -236,9 +237,9 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
<configuration>
<excludeDependencies>true</excludeDependencies>
+ <manifestLocation>target/osgi</manifestLocation>
<instructions>
<!-- stops the "uses" clauses being added to "Export-Package" manifest entry -->
<_nouses>true</_nouses>
@@ -250,6 +251,15 @@
<Bundle-DocURL>${project.url}</Bundle-DocURL>
</instructions>
</configuration>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
<plugin>
<artifactId>maven-idea-plugin</artifactId>
@@ -523,6 +533,9 @@
<commons.osgi.import>*</commons.osgi.import>
<commons.osgi.dynamicImport></commons.osgi.dynamicImport>
<commons.osgi.private></commons.osgi.private>
+
+ <!-- location of any manifest file used by maven-jar-plugin -->
+ <commons.manifestfile>target/osgi/MANIFEST.MF</commons.manifestfile>
<!--
Make the deployment protocol pluggable. This allows to switch to