------ Usage ------ Jerome Lacoste Dennis Lundberg ------ 12 July 2006 ------ Usage Some brief examples on how to use this plugin. If you want to use advanced configurations you should have a look at {{{http://maven.apache.org/ref/current/maven-archiver/apidocs/org/apache/maven/archiver/MavenArchiveConfiguration.html}the Javadocs for MavenArchiveConfiguration}}. * How to build a jar file If the packaging of your project is set to 'jar', this plugin is executed whenever it passes the "package" phase. Have it executed using the command below from your project: +-----------------+ mvn package +-----------------+ In your project's target directory you'll able to see the generated jar file. * How to sign a jar file If you need to sign a jar, when using the 'jar' packaging, you just need to configure the sign goal appropriately in your <<>> for the signing to occur automatically during the package phase. Note that you can automatically verify a jar after signing it. +-----------------+ ... jar ... ... org.apache.maven.plugins maven-jar-plugin sign /path/to/your/keystore youralias yourstorepassword ${project.build.directory}/signed/${project.build.finalName}.jar true ... ... +-----------------+ If you do not specify the \ file, your jar will be signed in-place. If you do specify it, the plugin will attempt to create the resulting containing directory. * How to sign a jar file specifying parameters on the command line +-----------------+ mvn jar:sign -Dkeystore=/path/to/your/keystore -Dstorepass=yourstorepassword -Dalias=youralias +-----------------+ * How to verify a signed jar file specifying parameters on the command line +-----------------+ mvn jar:sign-verify [-Djarpath=/path/to/your/signedjar] [-Dverbose=true [-Dcheckcerts=true] ] +-----------------+ * How to disable jar signing +-----------------+ mvn ... -Dmaven.jar.skip.sign=true +-----------------+ For full documentation, click {{{plugin-info.html}here}}.