manifest binding prefix

This binding allows you to include values from the manifest file. It will search through all manifest files, and on the first occurence of the key, the value will be returned.

For example the following


${manifest:Build-Jdk}

will display the jdk which was used to build the jar containing the first manifest which contains the key.

It is most practical for displaying version numbers etc. When the master pom for the project contains the following (here taken from equanda itself)


<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
<configuration>
<doCheck>false</doCheck>
<doUpdate>false</doUpdate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<equanda-build>${buildNumber}</equanda-build>
<equanda-version>${project.version}</equanda-version>
</manifestEntries>
</archive>
</configuration>
</plugin>

The including


equanda version used ${manifest:equanda-version}, build ${manifest:equanda-build}

Will display the data which was included at compile time.

  • 1. manifest binding prefix