org.junitee.anttask
Class JUnitEEWarTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.MatchingTask
              extended byorg.apache.tools.ant.taskdefs.Zip
                  extended byorg.apache.tools.ant.taskdefs.Jar
                      extended byorg.apache.tools.ant.taskdefs.War
                          extended byorg.junitee.anttask.JUnitEEWarTask
All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

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

This ant task builds the .war file which will contains the server-side unit tests.

Version:
$Revision: 1.11 $
Author:
Pierre CARION

Nested Class Summary
 class JUnitEEWarTask.AbstractEjbRef
           
 class JUnitEEWarTask.EjbLocalRef
           
 class JUnitEEWarTask.EjbRef
           
 class JUnitEEWarTask.ResRef
           
 
Nested classes inherited from class org.apache.tools.ant.taskdefs.Jar
org.apache.tools.ant.taskdefs.Jar.FilesetManifestConfig
 
Nested classes 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
JUnitEEWarTask()
           
 
Method Summary
 void addClasses(org.apache.tools.ant.types.ZipFileSet fs)
           
 void addTestCases(org.apache.tools.ant.types.FileSet fs)
          The nested testCases element specifies a FileSet.
 JUnitEEWarTask.EjbLocalRef createEjbLocalRef()
          Create a nested ejbLocalRef element.
 JUnitEEWarTask.EjbRef createEjbRef()
          Create a nested ejbRef element.
 JUnitEEWarTask.ResRef createResourceRef()
          Create a nested resourceRef element.
 void execute()
          Entry point when the task is ran from ant
 void setHtmlRefreshDelay(java.lang.String htmlRefreshDelay)
          This optional parameter defines the delay for HTML page refreshes when run as a separate thread.
 void setServletclass(java.lang.String servletclass)
          Set the name of the servlet used in the generated deployment descriptor.
 void setTestjarname(java.lang.String name)
          This optional parameter define the name of the .jar file which will contain the test classes.
 void setWebxml(java.io.File descr)
           
 
Methods inherited from class org.apache.tools.ant.taskdefs.War
addLib, addWebinf, cleanUp, initZipOutputStream, setWarfile, zipFile
 
Methods inherited from class org.apache.tools.ant.taskdefs.Jar
addConfiguredManifest, addMetainf, createEmptyZip, finalizeZipOutputStream, getResourcesToAdd, reset, setFilesetmanifest, setIndex, setJarfile, setManifest, setManifestEncoding, setWhenempty, zipFile
 
Methods inherited from class org.apache.tools.ant.taskdefs.Zip
addFileset, addParentDirs, addResources, addZipfileset, addZipGroupFileset, executeMain, getDestFile, getEncoding, grabResources, isAddingNewFiles, isCompress, isEmpty, isInUpdateMode, selectFileResources, setBasedir, setCompress, setDestFile, setDuplicate, setEncoding, setFile, setFilesonly, setKeepCompression, setUpdate, setZipfile, 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

JUnitEEWarTask

public JUnitEEWarTask()
Method Detail

setHtmlRefreshDelay

public void setHtmlRefreshDelay(java.lang.String htmlRefreshDelay)
This optional parameter defines the delay for HTML page refreshes when run as a separate thread. The default value is 2.


setTestjarname

public void setTestjarname(java.lang.String name)
This optional parameter define the name of the .jar file which will contain the test classes. This parameter is just the name of a .jar file (without any directory) (eg.: test.jar) If this parameter is not set, the classes will appear as standalone classes in WEB-INF/classes If this parameter is set, the classes will be bundled into a jar file stored in WEB-INF/lib/


setServletclass

public void setServletclass(java.lang.String servletclass)
Set the name of the servlet used in the generated deployment descriptor.

Parameters:
servletclass -

setWebxml

public void setWebxml(java.io.File descr)

addClasses

public void addClasses(org.apache.tools.ant.types.ZipFileSet fs)

addTestCases

public void addTestCases(org.apache.tools.ant.types.FileSet fs)
The nested testCases element specifies a FileSet. All files included in this fileset will be considered as the test classes to run. Those classes will appear in the generated index.html and the user will be able to run them individually

Parameters:
fs - nested classes element

createEjbRef

public JUnitEEWarTask.EjbRef createEjbRef()
Create a nested ejbRef element. An EjbRef describes a in the generated web.xml file.

Returns:
new ejbRef element

createEjbLocalRef

public JUnitEEWarTask.EjbLocalRef createEjbLocalRef()
Create a nested ejbLocalRef element. An EjbLocalRef describes a in the generated web.xml file.

Returns:
new ejbRef element

createResourceRef

public JUnitEEWarTask.ResRef createResourceRef()
Create a nested resourceRef element.

Returns:

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Entry point when the task is ran from ant

Throws:
org.apache.tools.ant.BuildException