|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtiger.ant.Java
public final class Java
An element used in the Ant task
to specify the environment for the Java Virtual Machine that
executes the test run. The JVM will be a forked process from the JVM that the Ant task is running in. This element is
the same as the core Ant <java> task except
that some of the elements and attributes are not present on this element.
JTigerTask
Constructor Summary | |
---|---|
Java(org.apache.tools.ant.taskdefs.Java java)
Create a Java that wraps the given Apache Ant Java task. |
Method Summary | |
---|---|
void |
addAssertions(org.apache.tools.ant.types.Assertions assertions)
Control enablement of Java 1.4 assertions with an <assertions> subelement. |
void |
addEnv(org.apache.tools.ant.types.Environment.Variable env)
Adds an environment variable. |
void |
addSysproperty(org.apache.tools.ant.types.Environment.Variable sysproperty)
Adds a system property. |
void |
addSyspropertyset(org.apache.tools.ant.types.PropertySet syspropertyset)
Adds a system property set. |
org.apache.tools.ant.types.Path |
createBootclasspath()
Creates a boot classpath. |
org.apache.tools.ant.types.Path |
createClasspath()
Creates a classpath. |
org.apache.tools.ant.types.Commandline.Argument |
createJvmarg()
Creates a JVM argument. |
org.apache.tools.ant.types.Permissions |
createPermissions()
Creates a set of permissions. |
void |
execute()
Forks the JVM using the core Ant <java> task. |
void |
setAppend(boolean append)
Sets whether output and error files should be appended to ( true )or overwritten (false ). |
void |
setClasspath(org.apache.tools.ant.types.Path classpath)
Sets a classpath. |
void |
setClasspathRef(org.apache.tools.ant.types.Reference classpathRef)
Sets a classpath reference. |
void |
setDir(File dir)
Sets the directory to invoke the VM in. |
void |
setError(File error)
Sets the file to which the standard error of the command should be redirected. |
void |
setErrorProperty(String errorProperty)
Sets the name of a property in which the standard error of the command should be stored. |
void |
setFailonerror(boolean failonerror)
Sets whether to stop the build process if the command exits with a returncode other than 0. |
void |
setJvm(String jvm)
Sets the command used to invoke the Java Virtual Machine, default is ' java '. |
void |
setLogError(boolean logError)
This attribute is used when you wish to see error output in Ant's log and you are redirecting output to a file/property. |
void |
setMaxmemory(String maxmemory)
Max amount of memory to allocate to the forked VM. |
void |
setNewenvironment(boolean newenvironment)
Sets whether to propagate old environment when new environment variables are specified. |
void |
setOutput(File output)
Sets the name of a file to which to write the output. |
void |
setOutputproperty(String outputproperty)
Sets the name of a property in which the output of the command should be stored. |
void |
setResultProperty(String resultProperty)
Sets the name of a property in which the return code of the command should be stored. |
void |
setSpawn(boolean spawn)
Sets the ability to start a process which will outlive ant. |
void |
setTimeout(Long timeout)
Stop the command if it doesn't finish within the specified time (given in milliseconds). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Java(org.apache.tools.ant.taskdefs.Java java)
java
- The Apache Ant Java task to wrap.Method Detail |
---|
public void addAssertions(org.apache.tools.ant.types.Assertions assertions)
assertions
- The assertion set.public void addEnv(org.apache.tools.ant.types.Environment.Variable env)
env
- The new environment variable.public void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysproperty)
sysproperty
- The new system property.public void addSyspropertyset(org.apache.tools.ant.types.PropertySet syspropertyset)
syspropertyset
- The new system property set.public org.apache.tools.ant.types.Path createBootclasspath()
public org.apache.tools.ant.types.Path createClasspath()
public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
public org.apache.tools.ant.types.Permissions createPermissions()
public void setAppend(boolean append)
true
)or overwritten (false
).
append
- The value of whether output and error files should be appended to (true
)or overwritten
(false
).public void setClasspath(org.apache.tools.ant.types.Path classpath)
classpath
- A new classpath.public void setClasspathRef(org.apache.tools.ant.types.Reference classpathRef)
classpathRef
- A new classpath reference.public void setDir(File dir)
dir
- The directory to invoke the VM in.public void setError(File error)
error
- The file to which the standard error of the command should be redirected.public void setErrorProperty(String errorProperty)
errorProperty
- The name of a property in which the standard error of the command should be stored.public void setFailonerror(boolean failonerror)
failonerror
- The value of whether to stop the build process if the command exits with a returncode other
than 0.public void setJvm(String jvm)
java
'. The command is resolved
by java.lang.Runtime.exec().
jvm
- The command used to invoke the Java Virtual Machine, default is 'java
'. The command is
resolved by java.lang.Runtime.exec().public void setLogError(boolean logError)
logError
- This attribute is used when you wish to see error output in Ant's log and you are redirecting
output to a file/property. The error output will not be included in the output file/property. If you redirect
error with the "error" or "errorProperty" attributes, this will have no effect.public void setMaxmemory(String maxmemory)
maxmemory
- The maximum amount of memory to allocate to the forked VM.public void setNewenvironment(boolean newenvironment)
newenvironment
- The value of whether to propagate old environment when new environment variables are
specified.public void setOutput(File output)
output
- The name of a file to which to write the output. If the error stream is not also redirected to a
file or property, it will appear in this output.public void setOutputproperty(String outputproperty)
outputproperty
- The name of a property in which the output of the command should be stored. Unless the
error stream is redirected to a separate file or stream, this property will include the error output.public void setResultProperty(String resultProperty)
failonerror=false
.
resultProperty
- The name of a property in which the return code of the command should be stored. Only of
interest if failonerror=false
.public void setSpawn(boolean spawn)
spawn
- The ability to start a process which will outlive ant.public void setTimeout(Long timeout)
timeout
- The specified time (given in milliseconds).public void execute() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
- IF a problem occurs during execution of the forked JVM.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |