@Mojo(name="sign",
defaultPhase=PACKAGE)
public class SignMojo
extends org.apache.maven.plugin.AbstractMojo
.jar
extension are signed, other
artifacts are not signed but a warning message is logged.Modifier and Type | Field and Description |
---|---|
private int |
connectTimeoutMillis
Deprecated.
Use timeoutMillis instead. This one is for establishing the TCP connection only, you may
be looking for a wall timeout instead.
|
private boolean |
continueOnFail
Whether the build should be stopped if the signing process fails.
|
private static int |
DEFAULT_RETRY_LIMIT |
private static java.lang.String |
DEFAULT_RETRY_LIMIT_STRING |
private static int |
DEFAULT_RETRY_TIMER |
private static java.lang.String |
DEFAULT_RETRY_TIMER_STRING
The default number of seconds the process will wait if
|
private boolean |
deprecatedContinueOnFail
Deprecated.
The user property
continueOnFail is deprecated. You
should use the qualified property
cbi.jarsigner.continueOnFail instead. The
deprecatedContinueOnFail parameter has been
introduced to support this deprecated user property for
backward compatibility only. |
private int |
deprecatedRetryLimit
Deprecated.
The user property
retryLimit is deprecated. You
should use the qualified property
cbi.jarsigner.retryLimit instead. The
deprecatedRetryLimit parameter has been introduced to
support this deprecated user property for backward
compatibility only. |
private int |
deprecatedRetryTimer
Deprecated.
The user property
retryTimer is deprecated. You
should use the qualified property
cbi.jarsigner.retryTimer instead. The
deprecatedRetryTimer parameter has been introduced to
support this deprecated user property for backward
compatibility only. |
private MessageDigestAlgorithm |
digestAlgorithm
The digest algorithm to use for signing the jar file.
|
private boolean |
excludeInnerJars
Whether to excludes signing inner jars (not recursive, only apply to
first level Jars inside the build Jar file; deeper jars are ignored in
all cases).
|
private org.apache.maven.project.MavenProject |
project
The Maven project.
|
private JarResigner.Strategy |
resigningStrategy
The strategy to be used if the artifacts of the current project are
already signed (e.g., when
replaced with a baseline version).
|
private int |
retryLimit
Number of times to retry signing if the server fails to sign.
|
private int |
retryTimer
Number of seconds to wait before retrying to sign.
|
private java.lang.String |
sigFile |
private SignatureAlgorithm |
signatureAlgorithm
The signature algorithm to use for signing the jar file.
|
private java.lang.String |
signerUrl
The signing service URL for signing Jar files.
|
private boolean |
skip
Whether the execution of this plugin should be skipped.
|
private java.util.List<java.lang.String> |
supportedProjectTypes
Deprecated.
Not used anymore.
|
private int |
timeoutMillis
Defines the wall timeout in milliseconds for performing the remote request.
|
Constructor and Description |
---|
SignMojo() |
Modifier and Type | Method and Description |
---|---|
private boolean |
continueOnFail() |
private JarSigner |
createJarSigner()
Creates and returns the
JarSigner according to the injected Mojo
parameter. |
void |
execute() |
private int |
retryLimit() |
private int |
retryTimer() |
private void |
signArtifact(JarSigner jarSigner,
org.apache.maven.artifact.Artifact artifact) |
private static final java.lang.String DEFAULT_RETRY_TIMER_STRING
private static final int DEFAULT_RETRY_TIMER
private static final java.lang.String DEFAULT_RETRY_LIMIT_STRING
private static final int DEFAULT_RETRY_LIMIT
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject project
@Parameter(required=true, property="cbi.jarsigner.signerUrl", defaultValue="http://build.eclipse.org:31338/sign") private java.lang.String signerUrl
@Parameter(property="cbi.jarsigner.skip", defaultValue="false") private boolean skip
@Deprecated @Parameter(property="continueOnFail", defaultValue="false") private boolean deprecatedContinueOnFail
continueOnFail
is deprecated. You
should use the qualified property
cbi.jarsigner.continueOnFail
instead. The
deprecatedContinueOnFail
parameter has been
introduced to support this deprecated user property for
backward compatibility only.@Parameter(property="cbi.jarsigner.continueOnFail", defaultValue="false") private boolean continueOnFail
@Deprecated @Parameter(property="retryLimit", defaultValue="3") private int deprecatedRetryLimit
retryLimit
is deprecated. You
should use the qualified property
cbi.jarsigner.retryLimit
instead. The
deprecatedRetryLimit
parameter has been introduced to
support this deprecated user property for backward
compatibility only.@Parameter(property="cbi.jarsigner.retryLimit", defaultValue="3") private int retryLimit
@Deprecated @Parameter(property="retryTimer", defaultValue="10") private int deprecatedRetryTimer
retryTimer
is deprecated. You
should use the qualified property
cbi.jarsigner.retryTimer
instead. The
deprecatedRetryTimer
parameter has been introduced to
support this deprecated user property for backward
compatibility only.@Parameter(property="cbi.jarsigner.retryTimer", defaultValue="10") private int retryTimer
@Parameter(defaultValue="false") private boolean excludeInnerJars
@Deprecated @Parameter private java.util.List<java.lang.String> supportedProjectTypes
@Parameter(property="cbi.jarsigner.resigningStrategy", defaultValue="RESIGN") private JarResigner.Strategy resigningStrategy
continueOnFail
property is not setdigestAlgorithm
)digestAlgorithm
is ignored for the
already signed jars.digestAlgorithm
)digestAlgorithm
is ignored for the already signed jars.@Parameter(property="cbi.jarsigner.digestAlgorithm", defaultValue="DEFAULT") private MessageDigestAlgorithm digestAlgorithm
@Parameter(property="cbi.jarsigner.signatureAlgorithm", defaultValue="DEFAULT") private SignatureAlgorithm signatureAlgorithm
@Deprecated @Parameter(property="cbi.jarsigner.connectTimeoutMillis", defaultValue="5000") private int connectTimeoutMillis
@Parameter(property="cbi.jarsigner.timeoutMillis", defaultValue="0") private int timeoutMillis
@Parameter(property="cbi.jarsigner.sigFile", defaultValue="") private java.lang.String sigFile
public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void signArtifact(JarSigner jarSigner, org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private boolean continueOnFail()
private int retryLimit()
private int retryTimer()