|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.MatchingTask
com.xmlcalabash.drivers.CalabashTask
public class CalabashTask
Ant task to run Calabash.
Owes a lot to Ant's <xslt> task, but this task can't become part of Ant because this task relies on Calabash, which is licensed under LGPL.
Nested Class Summary | |
---|---|
static class |
CalabashTask.Namespace
The Namespace inner class represents a namespace binding. |
static class |
CalabashTask.Option
The Option inner class represents a pipeline option. |
static class |
CalabashTask.Parameter
The Parameter inner class represents a pipeline parameter, which looks a lot like an option sent to a parameter port (or ports). |
static class |
CalabashTask.Port
The Port inner class used to represent input and output ports. |
Field Summary |
---|
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask |
---|
fileset |
Fields inherited from class org.apache.tools.ant.Task |
---|
target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
---|
description, location, project |
Constructor Summary | |
---|---|
CalabashTask()
|
Method Summary | |
---|---|
void |
add(org.apache.tools.ant.util.FileNameMapper fileNameMapper)
Adds a nested filenamemapper. |
void |
add(org.apache.tools.ant.types.ResourceCollection rc)
Adds a collection of resources to process in addition to the given file or the implicit fileset. |
void |
addConfiguredInput(CalabashTask.Port i)
Work with an instance of an element already configured by Ant. |
void |
addConfiguredNamespace(CalabashTask.Namespace n)
Work with an instance of a |
void |
addConfiguredOption(CalabashTask.Option o)
Work with an instance of a |
void |
addConfiguredOutput(CalabashTask.Port o)
Work with an instance of an |
void |
addConfiguredParameter(CalabashTask.Parameter p)
Work with an instance of a |
void |
addConfiguredPipeline(org.apache.tools.ant.types.resources.Resources rc)
Add a nested <pipeline> element. |
void |
addMapper(org.apache.tools.ant.types.Mapper mapper)
Defines the mapper to map source to destination files. |
void |
addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
A system property to set during transformation. |
void |
addSyspropertyset(org.apache.tools.ant.types.PropertySet sysp)
A set of system properties to set during transformation. |
void |
execute()
Do the work. |
protected void |
handleError(java.lang.String msg)
Throws an exception with the given message if failOnError is true, otherwise logs the message using the WARN level. |
protected void |
handleError(java.lang.Throwable ex)
Throws an exception with the given nested exception if failOnError is true, otherwise logs the message using the WARN level. |
void |
setBasedir(java.io.File dir)
Set the base directory; optional, default is the project's basedir. |
void |
setDebug(boolean debug)
Set whether to enable debugging output; optional, default is false. |
void |
setDestdir(java.io.File dir)
Set the destination directory into which the XSL result files should be copied to; required, unless in and out are specified. |
void |
setExtension(java.lang.String name)
Set the desired file extension to be used for the target; optional, default is '-out.xml'. |
void |
setFailOnError(boolean b)
Whether any errors should make the build fail. |
void |
setFailOnNoResources(boolean b)
Whether the build should fail if the nested resource collection is empty. |
void |
setForce(boolean force)
Set whether to check dependencies, or always generate; optional, default is false. |
void |
setGeneralValues(boolean generalValues)
Set whether to enable general values; optional, default is false. |
void |
setIn(org.apache.tools.ant.types.Resource inResource)
Set the input resource. |
void |
setinPort(java.lang.String port)
Set the input port name. |
void |
setJSONFlavor(java.lang.String jsonFlavor)
Set whether to automatically translate between JSON and XML; optional, default is false. |
void |
setOut(org.apache.tools.ant.types.Resource outResource)
Set the output resource. |
void |
setOutPort(java.lang.String port)
Set the output port name. |
void |
setPipeline(java.lang.String uri)
Set the pipeline. |
void |
setPipelineResource(org.apache.tools.ant.types.Resource pipelineResource)
API method to set the pipeline Resource. |
void |
setScanIncludedDirectories(boolean b)
Whether to process all files in the included directories as well; optional, default is true. |
void |
setTransparentJSON(boolean transparentJSON)
Set whether to automatically translate between JSON and XML; optional, default is false. |
void |
setUseImplicitFileset(boolean useimplicitfileset)
Whether to use the implicit fileset. |
void |
setUseXslt10(boolean useXslt10)
Set whether to enable use of XSLT 1.0; optional, default is false. |
void |
setXPointerOnText(boolean xpointerOnText)
Set whether xpointer attribute on an XInclude element can be used when parse="text"; optional, default is false. |
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 |
---|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
---|
clone, getDescription, getLocation, getProject, setDescription, setLocation |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CalabashTask()
Method Detail |
---|
public void setBasedir(java.io.File dir)
dir
- the base directorypublic void setinPort(java.lang.String port)
port
- the port namepublic void setIn(org.apache.tools.ant.types.Resource inResource)
inResource
- the Resource
public void addConfiguredInput(CalabashTask.Port i)
i
- the configured input Portpublic void setFailOnNoResources(boolean b)
public void setPipeline(java.lang.String uri)
uri
- pipeline locationpublic void setPipelineResource(org.apache.tools.ant.types.Resource pipelineResource)
pipelineResource
- Resource to set as the pipeline.public void addConfiguredPipeline(org.apache.tools.ant.types.resources.Resources rc)
rc
- the configured Resources object represented as
<pipeline>.public void setDestdir(java.io.File dir)
dir
- the name of the destination directorypublic void setOutPort(java.lang.String port)
port
- the port namepublic void setOut(org.apache.tools.ant.types.Resource outResource)
outResource
- the Resource
public void addConfiguredOutput(CalabashTask.Port o)
public void setExtension(java.lang.String name)
name
- the extension to usepublic void setFailOnError(boolean b)
public void add(org.apache.tools.ant.types.ResourceCollection rc)
rc
- the collection of resources to stylepublic void setUseImplicitFileset(boolean useimplicitfileset)
Set this to false if you want explicit control with nested resource collections.
useimplicitfileset
- set to true if you want to use
implicit filesetpublic void setScanIncludedDirectories(boolean b)
b
- true if files in included directories are processed.public void addMapper(org.apache.tools.ant.types.Mapper mapper) throws org.apache.tools.ant.BuildException
mapper
- the mapper to use
org.apache.tools.ant.BuildException
- if more than one mapper is definedpublic void add(org.apache.tools.ant.util.FileNameMapper fileNameMapper) throws org.apache.tools.ant.BuildException
fileNameMapper
- the mapper to add
org.apache.tools.ant.BuildException
- if more than one mapper is definedpublic void setForce(boolean force)
force
- true if always generate.public void addSysproperty(org.apache.tools.ant.types.Environment.Variable sysp)
public void addSyspropertyset(org.apache.tools.ant.types.PropertySet sysp)
public void addConfiguredNamespace(CalabashTask.Namespace n)
n
- the configured Namespacepublic void addConfiguredOption(CalabashTask.Option o)
public void addConfiguredParameter(CalabashTask.Parameter p)
p
- the configured Parameterpublic void setDebug(boolean debug)
debug
- true if enable debug outputpublic void setGeneralValues(boolean generalValues)
generalValues
- true if enable general valuespublic void setXPointerOnText(boolean xpointerOnText)
xpointerOnText
- true if enable XPointer on textpublic void setUseXslt10(boolean useXslt10)
useXslt10
- true if enable XSLT 1.0 supportpublic void setTransparentJSON(boolean transparentJSON)
transparentJSON
- true if enable translationpublic void setJSONFlavor(java.lang.String jsonFlavor)
jsonFlavor
- the flavor of JSON/XML transformation to usepublic void execute()
execute
in class org.apache.tools.ant.Task
protected void handleError(java.lang.String msg)
protected void handleError(java.lang.Throwable ex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |