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.34 2005/01/29 15:49:18 vmassol Exp $

Nested Class Summary
 
Nested classes inherited from class org.apache.tools.ant.taskdefs.optional.junit.JUnitTask
org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.ForkMode, 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 to both client side and server side JVMs.
 org.apache.tools.ant.types.Path createContainerClasspath()
          Adds container classpath to the classpath that will be used for starting the container.
 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
addAssertions, addEnv, addFormatter, addSyspropertyset, addTest, createBatchTest, createBootclasspath, createClasspath, createJvmarg, createPermissions, handleErrorFlush, handleErrorOutput, setDir, setErrorProperty, setFailureProperty, setFiltertrace, setFork, setForkMode, setHaltonerror, setHaltonfailure, setIncludeantruntime, setJvm, setMaxmemory, setNewenvironment, setPrintsummary, setReloading, setShowOutput, setTempdir, setTimeout
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, 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
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 to both client side and server side JVMs.

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

createContainerClasspath

public org.apache.tools.ant.types.Path createContainerClasspath()
Adds container classpath to the classpath that will be used for starting the container.

Returns:
reference to the classpath
Since:
Cactus 1.6


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