We have a corporate wide super-pom that we use. It sets up all of the mvn site
reports, making sure that all of the users are using Findbugs, PMD, etc.
One of the things we want to do is add entered to our MANIFEST.MF
file. The entries help us pin down a particular jar to a particular Jenkins build and Subversion revision. The manifest looks like this:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: david
Build-Jdk: 1.7.0_55
Name: Build-Information
Project-Name: tc-jsonp-filter-trunk
SVN-Revision: 23928
Build-Number: 23
Name: Module-Information
Group-ID: com.travelclick
Version: 5.1
Artifact-ID: tc-jsonp-filter
If I add the following to the local pom.xml
, everything works fine:
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.1</version>
<configuration>
<archive>
<manifestSections>
<manifestSection>
<name>Build-Information</name>
<manifestEntries>
<Project-Name>${env.JOB_NAME}</Project-Name>
<Build-Number>${env.BUILD_NUMBER}</Build-Number>
<SVN-Revision>${env.SVN_REVISION}</SVN-Revision>
</manifestEntries>
</manifestSection>
<manifestSection>
<name>Module-Information</name>
<manifestEntries>
<Group-ID>${project.groupId}</Group-ID>
<Artifact-ID>${project.artifactId}</Artifact-ID>
<Version>${project.version}</Version>
</manifestEntries>
</manifestSection>
</manifestSections>
</archive>
</configuration>
</plugin>
</plugins>
....
</build>
However, if I add this to my super-pom, the MANIFEST.MF
file does not contain this information.
I know the super-pom is being downloaded (I can see that), and I know that other areas are working because it does JaCoCo test coverage, and that's only found in the super-pom.