schedin commented on code in PR #13:
URL: 
https://github.com/apache/maven-jarsigner-plugin/pull/13#discussion_r1420595140


##########
src/main/java/org/apache/maven/plugins/jarsigner/JarsignerSignMojo.java:
##########
@@ -90,6 +94,30 @@ public class JarsignerSignMojo extends AbstractJarsignerMojo 
{
     @Parameter(property = "jarsigner.certchain", readonly = true, required = 
false)
     private File certchain;
 
+    /**
+     * How many times to try to sign a jar (assuming each previous attempt is 
a failure). This option may be desirable
+     * if any network operations are used during signing, for example using a 
Time Stamp Authority or network based
+     * PKCS11 HSM solution for storing code signing keys.
+     *
+     * The default value of 1 indicate that no retries should be made.

Review Comment:
   Added method `AbstractJarsignerMojo.validateParameters()` and overridden in 
`JarsignerSignMojo`. Added `maxTries` and `maxRetryDelaySeconds` contraint 
check that will reset to default values and log if checks fail. Also added test 
cases to verify correct behaviour (see `JarsignerSignMojoRetryTest` and methods 
`testInvalidMaxTries_zero()`, `testInvalidMaxTries_negative()`, 
`testMaxRetryDelaySeconds()`, `testInvalidMaxRetryDelaySeconds_negative()`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to