Manifest Entries

If you find that the other configuration options for Maven Archiver are not enough for manipulating the manifest, you can add your own entries to it. This is done with the <manifestEntries> configuration element.

In this example we'll add some entries to the manifest by specifying what we'd like in the <configuration>/<archive> element of maven-jar-plugin.

Note: As with all the examples here, this configuration can be used in all plugins that use Maven Archiver, not just maven-jar-plugin as in this example.


As you see above you can use literal values or you can have values from the POM interpolated into literals or simply use straight POM expressions. So this is what your resultant manifest will look like inside the generated jar:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven ${maven.version}
Built-By: ${}
Build-Jdk: ${java.version}
mode: development

Note: If your pom.xml does not have the <url> element, referenced through interpolation, then the entry url will not be in the manifest.