ERROR_NO_SOURCE
public static final String ERROR_NO_SOURCE
error string for unit test verification:
JARSIGNER_COMMAND
protected static final String JARSIGNER_COMMAND
name of JDK program we are looking for
alias
protected String alias
The alias of signer.
filesets
protected Vector filesets
the filesets of the jars to sign
jar
protected File jar
The name of the jar file.
keypass
protected String keypass
password for the key in the store
keystore
protected String keystore
The url or path of keystore file.
maxMemory
protected String maxMemory
The maximum amount of memory to use for Jar signer
storepass
protected String storepass
password for the store
storetype
protected String storetype
type of store,-storetype param
verbose
protected boolean verbose
verbose output
addFileset
public void addFileset(FileSet set)
Adds a set of files to sign
set
- a set of files to sign
addValue
protected void addValue(ExecTask cmd,
String value)
add a value argument to a command
cmd
- command to manipulatevalue
- value to add
beginExecution
protected void beginExecution()
init processing logic; this is retained through our execution(s)
bindToKeystore
protected void bindToKeystore(ExecTask cmd)
bind to a keystore if the attributes are there
cmd
- command to configure
createJarSigner
protected ExecTask createJarSigner()
create the jarsigner executable task
- a task set up with the executable of jarsigner, failonerror=true
and bound to our redirector
createPath
public Path createPath()
Adds a path of files to sign.
createUnifiedSourcePath
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.
- a path that contains all files to sign
createUnifiedSources
protected Vector createUnifiedSources()
clone our filesets vector, and patch in the jar attribute as a new
fileset, if is defined
- a vector of FileSet instances
endExecution
protected void endExecution()
any cleanup logic
hasResources
protected boolean hasResources()
Has either a path or a fileset been specified?
- true if a path or fileset has been specified.
setAlias
public void setAlias(String alias)
the alias to sign under; required
alias
- the alias to sign under
setCommonOptions
protected void setCommonOptions(ExecTask cmd)
these are options common to signing and verifying
cmd
- command to configure
setJar
public void setJar(File jar)
the jar file to sign; required
jar
- the jar file to sign
setKeypass
public void setKeypass(String keypass)
password for private key (if different); optional
keypass
- the password for the key (if different)
setKeystore
public void setKeystore(String keystore)
keystore location; required
keystore
- the keystore location
setMaxmemory
public void setMaxmemory(String max)
Set the maximum memory to be used by the jarsigner process
max
- a string indicating the maximum memory according to the JVM
conventions (e.g. 128m is 128 Megabytes)
setStorepass
public void setStorepass(String storepass)
password for keystore integrity; required
storepass
- the password for the keystore
setStoretype
public void setStoretype(String storetype)
keystore type; optional
storetype
- the keystore type
setVerbose
public void setVerbose(boolean verbose)
Enable verbose output when signing ; optional: default false
verbose
- if true enable verbose output