[MJARSIGNER-53] - Add support of the "certchain" option in the "sign" mojo
authorOlivier Lamy <olamy@apache.org>
Fri, 18 Aug 2017 12:43:06 +0000 (12:43 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 18 Aug 2017 12:43:06 +0000 (12:43 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk@1805413 13f79535-47bb-0310-9956-ffa450edef68

pom.xml
src/main/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojo.java

diff --git a/pom.xml b/pom.xml
index 3e6588c..7e7e2e4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -109,7 +109,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.shared</groupId>
       <artifactId>maven-jarsigner</artifactId>
-      <version>1.4</version>
+      <version>3.0.0-SNAPSHOT</version>
     </dependency>
 
   </dependencies>
index 091cae9..4ce1348 100644 (file)
@@ -80,6 +80,19 @@ public class JarsignerSignMojo
      */
     @Parameter( property = "jarsigner.tsacert" )
     private String tsacert;
+    
+    /**
+     * Location of the extra certchain file.
+     * See 
+     * <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html#Options">
+     *   Java SE 7 documentation
+     * </a>
+     * for more info.
+     * 
+     * @since TODO
+     */
+    @Parameter( property = "jarsigner.certchain", readonly = true, required = false )
+    private File certchain;
 
     @Override
     protected String getCommandlineInfo( final Commandline commandLine )
@@ -121,6 +134,7 @@ public class JarsignerSignMojo
         request.setSigfile( sigfile );
         request.setTsaLocation( tsa );
         request.setTsaAlias( tsacert );
+        request.setCertchain( certchain );
 
         // Special handling for passwords through the Maven Security Dispatcher
         request.setKeypass( decrypt( keypass ) );