Modifier and Type | Field and Description |
---|---|
protected String |
alias
The alias of signer.
|
static String |
ERROR_NO_SOURCE
error string for unit test verification: "jar must be set through jar attribute or nested filesets"
|
protected Vector<FileSet> |
filesets
the filesets of the jars to sign
|
protected File |
jar
The name of the jar file.
|
protected static String |
JARSIGNER_COMMAND
name of JDK program we are looking for
|
protected String |
keypass
password for the key in the store
|
protected String |
keystore
The url or path of keystore file.
|
protected String |
maxMemory
The maximum amount of memory to use for Jar signer
|
protected String |
storepass
password for the store
|
protected String |
storetype
type of store,-storetype param
|
protected boolean |
strict
strict checking
|
protected boolean |
verbose
verbose output
|
Constructor and Description |
---|
AbstractJarSignerTask() |
Modifier and Type | Method and Description |
---|---|
void |
addFileset(FileSet set)
Adds a set of files to sign
|
void |
addSysproperty(Environment.Variable sysp)
Add a system property.
|
protected void |
addValue(ExecTask cmd,
String value)
add a value argument to a command
|
protected void |
beginExecution()
init processing logic; this is retained through our execution(s)
|
protected void |
bindToKeystore(ExecTask cmd)
bind to a keystore if the attributes are there
|
protected ExecTask |
createJarSigner()
create the jarsigner executable task
|
Path |
createPath()
Adds a path of files to sign.
|
protected Path |
createUnifiedSourcePath()
clone our path and add all explicitly specified FileSets as
well, patch in the jar attribute as a new fileset if it is
defined.
|
protected Vector<FileSet> |
createUnifiedSources()
clone our filesets vector, and patch in the jar attribute as a new
fileset, if is defined
|
protected void |
declareSysProperty(ExecTask cmd,
Environment.Variable property) |
protected void |
endExecution()
any cleanup logic
|
RedirectorElement |
getRedirector()
get the redirector.
|
protected boolean |
hasResources()
Has either a path or a fileset been specified?
|
void |
setAlias(String alias)
the alias to sign under; required
|
protected void |
setCommonOptions(ExecTask cmd)
these are options common to signing and verifying
|
void |
setExecutable(String executable)
Sets the actual executable command to invoke, instead of the binary
jarsigner found in Ant's JDK. |
void |
setJar(File jar)
the jar file to sign; required
|
void |
setKeypass(String keypass)
password for private key (if different); optional
|
void |
setKeystore(String keystore)
keystore location; required
|
void |
setMaxmemory(String max)
Set the maximum memory to be used by the jarsigner process
|
void |
setStorepass(String storepass)
password for keystore integrity; required
|
void |
setStoretype(String storetype)
keystore type; optional
|
void |
setStrict(boolean strict)
do strict checking
|
void |
setVerbose(boolean verbose)
Enable verbose output when signing ; optional: default false
|
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
protected String alias
public static final String ERROR_NO_SOURCE
protected File jar
protected static final String JARSIGNER_COMMAND
protected String keypass
protected String keystore
protected String maxMemory
protected String storepass
protected String storetype
protected boolean strict
protected boolean verbose
public void addFileset(FileSet set)
set
- a set of files to signpublic void addSysproperty(Environment.Variable sysp)
sysp
- system property.protected void addValue(ExecTask cmd, String value)
cmd
- command to manipulatevalue
- value to addprotected void beginExecution()
protected void bindToKeystore(ExecTask cmd)
cmd
- command to configureprotected ExecTask createJarSigner()
public Path createPath()
protected Path createUnifiedSourcePath()
protected Vector<FileSet> createUnifiedSources()
protected void declareSysProperty(ExecTask cmd, Environment.Variable property) throws BuildException
cmd
- command to configureproperty
- property to setBuildException
- if the property is not correctly defined.protected void endExecution()
public RedirectorElement getRedirector()
beginExecution()
and endExecution()
protected boolean hasResources()
public void setAlias(String alias)
alias
- the alias to sign underprotected void setCommonOptions(ExecTask cmd)
cmd
- command to configurepublic void setExecutable(String executable)
jarsigner
found in Ant's JDK.executable
- the command to invoke.public void setJar(File jar)
jar
- the jar file to signpublic void setKeypass(String keypass)
keypass
- the password for the key (if different)public void setKeystore(String keystore)
keystore
- the keystore locationpublic void setMaxmemory(String max)
max
- a string indicating the maximum memory according to the JVM
conventions (e.g. 128m is 128 Megabytes)public void setStorepass(String storepass)
storepass
- the password for the keystorepublic void setStoretype(String storetype)
storetype
- the keystore typepublic void setStrict(boolean strict)
strict
- public void setVerbose(boolean verbose)
verbose
- if true enable verbose output