org.apache.cactus.integration.ant
Class CactusTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.optional.junit.JUnitTask
              extended byorg.apache.cactus.integration.ant.CactusTask

public class CactusTask
extends org.apache.tools.ant.taskdefs.optional.junit.JUnitTask

An Ant task that extends the optional JUnit task to provide support for in-container testing.

Version:
$Id: CactusTask.java,v 1.20.2.5 2003/10/25 17:22:06 vmassol Exp $
Author:
Christopher Lenz, Vincent Massol

Nested Class Summary
 
Nested classes inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.SummaryAttribute
 
Constructor Summary
CactusTask()
          Constructor.
 
Method Summary
 void addConfiguredCactusproperty(PropertySet thePropertySet)
          Adds a set of properties that will be used as system properties either on the client side or on the server side.
 void addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
          Called by Ant when the Variable object has been properly initialized.
 void addContainerSet(ContainerSet theContainerSet)
          Adds the nested containers element (only one is permitted).
 void addSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
          Adds a system property.
 void execute()
           
 void init()
           
 void setEarFile(java.io.File theEarFile)
          Sets the enterprise application archive that will be tested.
 void setWarFile(java.io.File theWarFile)
          Sets the web application archive that will be tested.
 
Methods inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
addEnv, addFormatter, addTest, createBatchTest, createClasspath, createJvmarg, handleErrorFlush, handleErrorOutput, setDir, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setHaltonerror, setHaltonfailure, setIncludeantruntime, setJvm, setMaxmemory, setNewenvironment, setPrintsummary, setShowOutput, setTimeout
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CactusTask

public CactusTask()
           throws java.lang.Exception
Constructor.

Throws:
java.lang.Exception - If the constructor of JUnitTask throws an exception
Method Detail

init

public void init()
See Also:
Task.init()

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Throws:
org.apache.tools.ant.BuildException
See Also:
Task.execute()

addContainerSet

public final void addContainerSet(ContainerSet theContainerSet)
Adds the nested containers element (only one is permitted).

Parameters:
theContainerSet - The nested element to add

setEarFile

public final void setEarFile(java.io.File theEarFile)
Sets the enterprise application archive that will be tested. It must already contain the test-cases and the required libraries as a web module.

Parameters:
theEarFile - The EAR file to set

setWarFile

public final void setWarFile(java.io.File theWarFile)
Sets the web application archive that will be tested. It must already contain the test-cases and the required libraries.

Parameters:
theWarFile - The WAR file to set

addSysproperty

public void addSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
Adds a system property. Note that we can't reuse the JUnitTask sysproperty element as there is no getter to get them.

See Also:
JUnitTask.addSysproperty(Environment.Variable)

addConfiguredSysproperty

public void addConfiguredSysproperty(org.apache.tools.ant.types.Environment.Variable theProperty)
Called by Ant when the Variable object has been properly initialized.

Parameters:
theProperty - the system property to set

addConfiguredCactusproperty

public void addConfiguredCactusproperty(PropertySet thePropertySet)
Adds a set of properties that will be used as system properties either on the client side or on the server side.

Parameters:
thePropertySet - the set of properties to be added


Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.