Author: kenney
Date: Tue Apr 11 05:35:32 2006
New Revision: 393203

URL: http://svn.apache.org/viewcvs?rev=393203&view=rev
Log:
PR: MJAR-23
Submitted By: Jerome Lacoste
Patch by: Richard Allen <[EMAIL PROTECTED]>
Reviewed By: Kenney Westerhof

Add parameter to skip jar signing.

Slightly formatted Javadoc.

Modified:
    
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java
    maven/plugins/trunk/maven-jar-plugin/src/site/apt/howto.apt

Modified: 
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java?rev=393203&r1=393202&r2=393203&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java
 (original)
+++ 
maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarSignMojo.java
 Tue Apr 11 05:35:32 2006
@@ -49,6 +49,14 @@
     extends AbstractMojo
 {
     /**
+     * Set this to <code>true</code> to disable signing.
+     * Useful to speed up build process in development environment.
+     *
+     * @parameter expression="${maven.jar.sign.skip}" default-value="false"
+     */
+    private boolean skip;
+
+    /**
      * @parameter expression="${workingdir}" default-value="${basedir}"
      * @required
      */
@@ -162,7 +170,8 @@
     private MavenProject project;
 
     /**
-     * Classifier to use for the generated artifact. If not specified, the 
generated artifact becomes the primary artifact.
+     * Classifier to use for the generated artifact.
+     * If not specified, the generated artifact becomes the primary artifact.
      *
      * @parameter expression="${classifier}"
      */
@@ -171,6 +180,10 @@
     public void execute()
         throws MojoExecutionException
     {
+        if ( skip )
+        {
+            getLog().info( "Skipping JAR signing for file: " + 
getJarFile().getAbsolutePath() );
+        }
 
         signJar();
 

Modified: maven/plugins/trunk/maven-jar-plugin/src/site/apt/howto.apt
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-jar-plugin/src/site/apt/howto.apt?rev=393203&r1=393202&r2=393203&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/site/apt/howto.apt (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/site/apt/howto.apt Tue Apr 11 
05:35:32 2006
@@ -104,4 +104,10 @@
   m2 jar:sign-verify [-Djarpath=/path/to/your/signedjar] [-Dverbose=true 
[-Dcheckcerts=true] ]
 -------------------
 
+* How to disable jar signing
+
+-------------------
+  m2 ... -Dmaven.jar.skip.sign=true
+-------------------
+
   For full documentation, click {{{index.html}here}}.


Reply via email to