org.apache.cactus.integration.ant
Class CactifyWarTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.tools.ant.taskdefs.MatchingTask
              extended by org.apache.tools.ant.taskdefs.Zip
                  extended by org.apache.tools.ant.taskdefs.Jar
                      extended by org.apache.tools.ant.taskdefs.War
                          extended by org.apache.cactus.integration.ant.CactifyWarTask
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class CactifyWarTask
extends org.apache.tools.ant.taskdefs.War

An Ant task that injects elements necessary to run Cactus tests into an existing WAR file.

Version:
$Id: CactifyWarTask.java 394252 2006-04-15 04:20:17Z felipeal $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Jar
org.apache.tools.ant.taskdefs.Jar.FilesetManifestConfig
 
Nested classes/interfaces inherited from class org.apache.tools.ant.taskdefs.Zip
org.apache.tools.ant.taskdefs.Zip.ArchiveState, org.apache.tools.ant.taskdefs.Zip.Duplicate, org.apache.tools.ant.taskdefs.Zip.WhenEmpty
 
Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.Zip
addedDirs, archiveType, doubleFilePass, duplicate, emptyBehavior, entries, skipWriting, zipFile
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset
 
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
CactifyWarTask()
           
 
Method Summary
 void addConfiguredEjbref(org.codehaus.cargo.module.webapp.EjbRef theEjbRef)
          Adds a configured EjbRef instance.
 void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog theXmlCatalog)
          Adds an XML catalog to the internal catalog.
 void addFilterRedirector(FilterRedirector theFilterRedirector)
          Adds a Cactus filter test redirector.
 void addJspRedirector(JspRedirector theJspRedirector)
          Adds a Cactus JSP test redirector.
 void addServletRedirector(ServletRedirector theServletRedirector)
          Adds a Cactus servlet test redirector.
 java.io.File createTempFile(java.lang.String thePrefix, java.lang.String theSuffix, java.io.File theParentDir, boolean isDeleteOnExit)
          A method to create the temporary files.
 void execute()
          
 java.lang.String getContext()
          Returns the context.
 java.lang.String getFileName()
          Gets the file name.
 void setContext(java.lang.String context)
          Sets the context.
 void setIncludeCactusJars(boolean includeCactusJars)
          Sets whether the cactus jars should be included or not.
 void setMergeWebXml(java.io.File theMergeFile)
          The descriptor to merge into the original file.
 void setSrcFile(java.io.File theSrcFile)
          Sets the web application archive that should be cactified.
 void setVersion(Version theVersion)
          Sets the web-app version to use when creating a WAR file from scratch.
 
Methods inherited from class org.apache.tools.ant.taskdefs.War
addClasses, addLib, addWebinf, cleanUp, initZipOutputStream, setWarfile, setWebxml, zipFile
 
Methods inherited from class org.apache.tools.ant.taskdefs.Jar
addConfiguredIndexJars, addConfiguredManifest, addMetainf, createEmptyZip, finalizeZipOutputStream, findJarName, getResourcesToAdd, grabFilesAndDirs, reset, setFilesetmanifest, setIndex, setJarfile, setManifest, setManifestEncoding, setWhenempty, writeIndexLikeList, zipFile
 
Methods inherited from class org.apache.tools.ant.taskdefs.Zip
addFileset, addParentDirs, addResources, addZipfileset, addZipGroupFileset, executeMain, getComment, getDestFile, getEncoding, grabResources, isAddingNewFiles, isCompress, isEmpty, isInUpdateMode, selectFileResources, setBasedir, setComment, setCompress, setDestFile, setDuplicate, setEncoding, setFile, setFilesonly, setKeepCompression, setRoundUp, setUpdate, setZipfile, zipDir, zipDir
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CactifyWarTask

public CactifyWarTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException

Overrides:
execute in class org.apache.tools.ant.taskdefs.Zip
Throws:
org.apache.tools.ant.BuildException
See Also:
Task.execute()

addFilterRedirector

public final void addFilterRedirector(FilterRedirector theFilterRedirector)
Adds a Cactus filter test redirector.

Parameters:
theFilterRedirector - The redirector to add

addJspRedirector

public final void addJspRedirector(JspRedirector theJspRedirector)
Adds a Cactus JSP test redirector.

Parameters:
theJspRedirector - The redirector to add

addServletRedirector

public final void addServletRedirector(ServletRedirector theServletRedirector)
Adds a Cactus servlet test redirector.

Parameters:
theServletRedirector - The redirector to add

addConfiguredXMLCatalog

public final void addConfiguredXMLCatalog(org.apache.tools.ant.types.XMLCatalog theXmlCatalog)
Adds an XML catalog to the internal catalog.

Parameters:
theXmlCatalog - the XMLCatalog instance to use to look up DTDs

addConfiguredEjbref

public final void addConfiguredEjbref(org.codehaus.cargo.module.webapp.EjbRef theEjbRef)
Adds a configured EjbRef instance. Called by Ant.

Parameters:
theEjbRef - the EjbRef to add

setMergeWebXml

public final void setMergeWebXml(java.io.File theMergeFile)
The descriptor to merge into the original file.

Parameters:
theMergeFile - the web.xml to merge

setSrcFile

public final void setSrcFile(java.io.File theSrcFile)
Sets the web application archive that should be cactified.

Parameters:
theSrcFile - The WAR file to set

setVersion

public final void setVersion(Version theVersion)
Sets the web-app version to use when creating a WAR file from scratch.

Parameters:
theVersion - The version

setIncludeCactusJars

public final void setIncludeCactusJars(boolean includeCactusJars)
Sets whether the cactus jars should be included or not. If not set, the jars are included by default.

Parameters:
includeCactusJars - true if cactus jars should be included, false otherwise.

createTempFile

public java.io.File createTempFile(java.lang.String thePrefix,
                                   java.lang.String theSuffix,
                                   java.io.File theParentDir,
                                   boolean isDeleteOnExit)
A method to create the temporary files.

Parameters:
thePrefix - the prefix of the filename.
theSuffix - the suffix of the filename
theParentDir - the parent directory
isDeleteOnExit - should we delete the directories on exit?
Returns:
the temporary file

getFileName

public java.lang.String getFileName()
Gets the file name.

Returns:
the name of the web app file

getContext

public java.lang.String getContext()
Returns the context.

Returns:
java.lang.String

setContext

public void setContext(java.lang.String context)
Sets the context.

Parameters:
context -


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.