Apache Maven 1.x has reached its end of life, and is no longer supported. For more information, see the announcement. Users are encouraged to migrate to the current version of Apache Maven.

The manifest file

Here is a typical manifest file generated by the maven-jar-plugin-1.8:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_10-b03 (Sun Microsystems Inc.)
Built-By: lukas
Maven-Version: 1.1-beta-3-SNAPSHOT

Name: org/apache/maven
Extension-name: org.apache.maven
Specification-Title: Create jar files
Specification-Vendor: Apache Software Foundation
Specification-Version: 1.8
Implementation-Title: org.apache.maven
Implementation-Vendor: Apache Software Foundation
Implementation-Version: 1.8-SNAPSHOT

Note that the structure was different and probably not compatible in older versions of the plugin, see MPJAR-36.

Default attributes

AttributeDefault value
Created-By The java version used to generate the manifest file
Built-By ${user.name}
Maven-Version ${maven.application.version}
Class-Path See the maven.jar.manifest.classpath.add property.
Main-Class See the maven.jar.mainclass property.
Extension-List See the maven.jar.manifest.extensions.add property.
Name ${pom.package} with "." (dot) replaced by "/" (slash)
Extension-name ${pom.package}
Specification-Title ${pom.shortDescription} (trimmed to 46 characters)
Specification-Vendor ${pom.organization.name}
Specification-Version This is constructed from ${pom.currentVersion} in the following way: first any occurence of the string "-SNAPSHOT" is chopped off, the rest is then tokenized with a delimiter "." (dot), and up to three tokens are kept. Note that according to Sun's specification this must be a number to compare, so if your ${pom.currentVersion} contains any non-digit character (apart from "."), the resulting manifest will not be valid. You should then override this default (see below).
Implementation-Title ${pom.package}
Implementation-Vendor ${pom.organization.name}
Implementation-Version ${pom.currentVersion}

Overriding default values

Any of the above default values can be overridden by specifying a custom manifest file via the maven.jar.manifest property. Note that values in manifest sections (separated from the main section by a blank line) can only be overridden by also specifying the section name. For instance, even if you only want to override the Specification-Version in the example above, you need at least the following in your custom manifest:

Name: org/apache/maven
Specification-Version: 1.8.0