org.apache.tools.ant.taskdefs
public class SignJar extends AbstractJarSignerTask
Since: Ant 1.1
See Also:
beta documentation
UNKNOWN: category="java"
Field Summary | |
---|---|
protected File | destDir
the output directory when using paths. |
static String | ERROR_BAD_MAP
error string for unit test verification: {@value} |
static String | ERROR_MAPPER_WITHOUT_DEST
error string for unit test verification: {@value} |
static String | ERROR_NO_ALIAS
error string for unit test verification: {@value} |
static String | ERROR_NO_STOREPASS
error string for unit test verification: {@value} |
static String | ERROR_SIGNEDJAR_AND_PATHS
error string for unit test verification {@value} |
static String | ERROR_TODIR_AND_SIGNEDJAR
error string for unit test verification: {@value} |
static String | ERROR_TOO_MANY_MAPPERS
error string for unit test verification: {@value} |
protected boolean | internalsf
flag for internal sf signing |
protected boolean | lazy
Whether to assume a jar which has an appropriate .SF file in is already
signed. |
protected boolean | sectionsonly
sign sections only? |
protected String | sigfile
name to a signature file |
protected File | signedjar
name of a single jar |
protected String | tsacert
alias for the TSA in the keystore |
protected String | tsaurl
URL for a tsa; null implies no tsa support |
Method Summary | |
---|---|
void | add(FileNameMapper newMapper)
add a mapper to determine file naming policy. |
void | execute()
sign the jar(s)
|
FileNameMapper | getMapper()
get the active mapper; may be null |
String | getTsacert()
get the -tsacert option |
String | getTsaurl()
get the -tsaurl url |
protected boolean | isSigned(File file)
test for a file being signed, by looking for a signature in the META-INF
directory with our alias.
|
protected boolean | isUpToDate(File jarFile, File signedjarFile)
Compare a jar file with its corresponding signed jar. |
void | setDestDir(File destDir)
Optionally sets the output directory to be used.
|
void | setInternalsf(boolean internalsf)
Flag to include the .SF file inside the signature; optional; default
false
|
void | setLazy(boolean lazy)
flag to control whether the presence of a signature file means a JAR is
signed; optional, default false
|
void | setPreserveLastModified(boolean preserveLastModified)
true to indicate that the signed jar modification date remains the same
as the original. |
void | setSectionsonly(boolean sectionsonly)
flag to compute hash of entire manifest; optional, default false
|
void | setSigfile(String sigfile)
name of .SF/.DSA file; optional
|
void | setSignedjar(File signedjar)
name of signed JAR file; optional
|
void | setTsacert(String tsacert)
set the alias in the keystore of the TSA to use; |
void | setTsaurl(String tsaurl) |
Parameters: newMapper the mapper to add.
Since: Ant 1.7
Throws: BuildException on errors
Returns: mapper or null
Since: Ant 1.7
Returns: a certificate alias or null
Since: Ant 1.7
Returns: url or null
Since: Ant 1.7
Parameters: file the file to be checked
Returns: true if the file is signed
See Also: IsSigned
Parameters: jarFile the unsigned jar file signedjarFile the result signed jar file
Returns: true if the signedjarFile is considered up to date
Parameters: destDir the directory in which to place signed jars
Since: Ant 1.7
Parameters: internalsf if true include the .SF file inside the signature
Parameters: lazy flag to control whether the presence of a signature
Parameters: preserveLastModified if true preserve the last modified time
Parameters: sectionsonly flag to compute hash of entire manifest
Parameters: sigfile the name of the .SF/.DSA file
Parameters: signedjar the name of the signed jar file
Parameters: tsacert the cert alias.
Parameters: tsaurl the tsa url.
Since: Ant 1.7