|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.ProjectComponent org.apache.tools.ant.Task de.jdemo.capture.anttasks.AbstractDemoCaptureTask
public abstract class AbstractDemoCaptureTask
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.Task |
---|
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
project |
Constructor Summary | |
---|---|
protected |
AbstractDemoCaptureTask()
|
Method Summary | |
---|---|
protected void |
addClasspathEntry(java.lang.String resource)
Search for the given resource and add the directory or archive that contains it to the classpath. |
protected void |
addCommandLineArguments(org.apache.tools.ant.types.CommandlineJava cmd)
|
void |
addEnv(org.apache.tools.ant.types.Environment.Variable var)
Adds an environment variable; used when forking. |
void |
addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
Adds a system property that tests can access. |
protected void |
checkParameters()
|
org.apache.tools.ant.types.Path |
createClasspath()
Adds path to classpath used for tests. |
protected abstract AbstractDemoAntRunner |
createDemoAntRunner(DemoIdentifier demo,
org.apache.tools.ant.AntClassLoader cl)
|
org.apache.tools.ant.types.Commandline.Argument |
createJvmarg()
Adds a JVM argument; ignored if not forking. |
protected org.apache.tools.ant.taskdefs.ExecuteWatchdog |
createWatchdog()
|
void |
execute()
Runs the testcase. |
protected void |
execute(DemoIdentifier demoId)
Run the tests. |
java.lang.String |
getDemoId()
|
java.io.File |
getOutputFile()
|
protected abstract java.lang.String |
getRunnerClassName()
|
void |
init()
Adds the jars or directories containing Ant, this task and JUnit to the classpath - this should make the forked JVM work without having to specify them directly. |
void |
setDemoId(java.lang.String string)
|
void |
setDir(java.io.File dir)
The directory to invoke the VM in. |
void |
setFork(boolean value)
If true, JVM should be forked for each test. |
void |
setIncludeantruntime(boolean b)
If true, include ant.jar, optional.jar and junit.jar in the forked VM. |
void |
setJvm(java.lang.String value)
The command used to invoke the Java Virtual Machine, default is 'java'. |
void |
setMaxmemory(java.lang.String max)
Set the maximum memory to be used by all forked JVMs. |
void |
setNewenvironment(boolean newenv)
If true, use a new environment when forked. |
void |
setOutputFile(java.io.File file)
|
Methods inherited from class org.apache.tools.ant.Task |
---|
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
getProject, setProject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractDemoCaptureTask()
Method Detail |
---|
public final java.lang.String getDemoId()
public final void setDemoId(java.lang.String string)
public final java.io.File getOutputFile()
public final void setOutputFile(java.io.File file)
protected void checkParameters()
public void setFork(boolean value)
It avoids interference between testcases and possibly avoids hanging the build. this property is applied on all BatchTest (batchtest) and JUnitTest (test) however it can possibly be overridden by their own properties.
value
- true if a JVM should be forked, otherwise falsepublic void setMaxmemory(java.lang.String max)
max
- the value as defined by -mx or -Xmx in the
java command line options.public void setJvm(java.lang.String value)
value
- the new VM to use instead of javasetFork(boolean)
public org.apache.tools.ant.types.Commandline.Argument createJvmarg()
setFork(boolean)
public void setDir(java.io.File dir)
dir
- the directory to invoke the JVM from.setFork(boolean)
public void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
public org.apache.tools.ant.types.Path createClasspath()
public void addEnv(org.apache.tools.ant.types.Environment.Variable var)
Will be ignored if we are not forking a new VM.
public void setNewenvironment(boolean newenv)
Will be ignored if we are not forking a new VM.
public void setIncludeantruntime(boolean b)
public void init()
init
in class org.apache.tools.ant.Task
public final void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
protected void execute(DemoIdentifier demoId) throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
protected void addCommandLineArguments(org.apache.tools.ant.types.CommandlineJava cmd)
protected abstract java.lang.String getRunnerClassName()
protected abstract AbstractDemoAntRunner createDemoAntRunner(DemoIdentifier demo, org.apache.tools.ant.AntClassLoader cl)
protected org.apache.tools.ant.taskdefs.ExecuteWatchdog createWatchdog() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
protected void addClasspathEntry(java.lang.String resource)
Doesn't work for archives in JDK 1.1 as the URL returned by getResource doesn't contain the name of the archive.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |