< : Concat>

Description

This class contains the 'concat' task, used to concatenate a series of files into a single stream. The destination of this stream may be the system console, or a file. The following is a sample invocation:
 <concat destfile="${build.dir}/index.xml"
   append="false">

   <fileset dir="${xml.root.dir}"
     includes="*.xml" />

 </concat>
 

Parameters

Attribute Description Type Required?
force Force overwrite existing destination file boolean ?
encoding Sets the character encoding String ?
append Sets the behavior when the destination file exists. If set to true the stream data will be appended to the existing file, otherwise the existing file will be overwritten. Defaults to false. boolean ?
destfile Sets the destination file, or uses the console if not specified. File ?
binary set the binary attribute. if true, concat will concatenate the files byte for byte. This mode does not allow any filtering, or other modifications to the input streams. The default value is false. boolean ?
eol Specify the end of line to find and to add if not present at end of each input file. This attribute is used in conjunction with fixlastline. String ["asis", "cr", "lf", "crlf", "mac", "unix", "dos"] ?
outputencoding Sets the character encoding for outputting String ?
fixlastline Append line.separator to files that do not end with a line.separator, default false. boolean ?

Parameters accepted as nested elements

This Task accepts text in its element body.

<filterchain> ...

FilterChain may contain a chained set of filter readers.
Attribute Description Type Required
refid Makes this instance in effect a reference to another FilterChain instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Reference ?

<fileset> ...

Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).
Attribute Description Type Required
refid Reference ?
file File ?
dir File ?
defaultexcludes boolean ?
followsymlinks boolean ?
casesensitive boolean ?
excludes String ?
includesfile File ?
excludesfile File ?
includes String ?

<filelist> ...

FileList represents an explicitly named list of files. FileLists are useful when you want to capture a list of files regardless of whether they currently exist. By contrast, FileSet operates as a filter, only returning the name of a matched file if it currently exists in the file system.
Attribute Description Type Required
dir Set the dir attribute. File ?
refid Makes this instance in effect a reference to another FileList instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Reference ?
files Set the filenames attribute. String ?

<path> ...

This object represents a path as used by CLASSPATH or PATH environment variable.

<sometask>
  <somepath>
    <pathelement location="/path/to/file.jar" />
    <pathelement path="/path/to/file2.jar:/path/to/class2;/path/to/class3" />
    <pathelement location="/path/to/file3.jar" />
    <pathelement location="/path/to/file4.jar" />
  </somepath>
</sometask>

The object implemention sometask must provide a method called createSomepath which returns an instance of Path. Nested path definitions are handled by the Path object and must be labeled pathelement.

The path element takes a parameter path which will be parsed and split into single elements. It will usually be used to define a path from an environment variable.

Attribute Description Type Required
refid Makes this instance in effect a reference to another Path instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

Reference ?
path Parses a path definition and creates single PathElements. String ?

<footer>

sub element points to a file or contains text
Attribute Description Type Required
trimleading s:^\s*:: on each line of input boolean ?
trim whether to call text.trim() boolean ?
file set the text using a file File ?
encoding The encoding of the text element String ?
filtering whether to filter the text in this element or not. boolean ?

<header>

sub element points to a file or contains text
Attribute Description Type Required
trimleading s:^\s*:: on each line of input boolean ?
trim whether to call text.trim() boolean ?
file set the text using a file File ?
encoding The encoding of the text element String ?
filtering whether to filter the text in this element or not. boolean ?