Apache Maven JAR Plugin
This plugin builds JAR files. To sign JAR files, use the Maven Jarsigner Plugin.
Goals Overview
- jar:jar: create a JAR file for your project classes and their resources.
- jar:test-jar: create a JAR file for your project test classes.
Usage
General instructions for the JAR Plugin are on the usage page. The examples below describe more specific use cases.
If you have questions about the plugin, see the FAQ or contact the user mailing list. The mailing list stores all posts in an archive. An older thread can contain the answer to your question. You can search the mail archive for the answer.
If the plugin is missing a feature or has a defect, file a feature request or bug report in the issue tracker. When you create a new issue, describe your concern in detail. The developers must reproduce the problem to fix a bug. Attach entire debug logs, POMs, or small demo projects to the issue. Patches are welcome. Contributors can check out the project from the source repository and find supplementary information in the guide to helping with Maven.
Archiver Configuration
The plugin uses the JDK jar tool internally to create and verify the JAR file. The plugin uses Maven Archiver to handle manifest configuration. See the Maven Archiver Documentation to learn how to set it up. You can also see the Guide to Working with Manifests.
Examples
The following examples show some usages of the JAR Plugin:

