public class Snip
extends org.apache.tools.ant.Task
<filter>
s
within the <copy>
task.
The <snip>
task takes one or more nested
<fileset>
s that indicate the
files to process. Any text between lines containing "@@snip:myProperty@@"
and "@@endSnip@@" will be stored in a property called snip.myProperty.
Example Usage:
<taskdef
name="snip"
classname="com.martiansoftware.snip.Snip"
classpath="snip-0.11.jar"/>
<snip>
<fileset dir="src" includes="**/*.txt" />
</snip>
Multiple snippets may be defined within a single file. Snippets may not be nested.
Constructor and Description |
---|
Snip() |
Modifier and Type | Method and Description |
---|---|
void |
addFileSet(org.apache.tools.ant.types.FileSet fs)
Adds a FileSet to this Task
|
void |
execute()
Reads all snippets from the previously specified FileSets, storing
their contents in project properties.
|
void |
setXmlsafe(boolean xmlSafe)
Sets whether properties set by this task should be
"xml-safe" - that is, should have any greater-than or less-than signs
xml-encoded
|
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
public void addFileSet(org.apache.tools.ant.types.FileSet fs)
fs
- the FileSet to addpublic void setXmlsafe(boolean xmlSafe)
xmlSafe
- public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
- if any I/O errors occur while reading files.