B.3 AppendTask

The Append Task appends text or contents of files to a specified file.

In the example above, AppendTask is reading a filename from book/PhingGuide.book, processing the file contents with XSLT, and then appending the result to the file located at ${process.outputfile}. This is a real example from the build file used to generate this book!

Table B.3: Attributes

NameTypeDescriptionDefaultRequired
destFileFilePath of file to which text should be appended.n/aYes
fileFilePath to file that should be appended to destFile.n/aNo
textStringSome literal text to append to file.n/aNo

B.3.1 Examples

<append destFile="${process.outputfile}">
  <filterchain>
    <xsltfilter style="${process.stylesheet}">
	     <param name="mode" expression="${process.xslt.mode}"/>
    </xsltfilter>
  </filterchain>
  <filelist dir="book/" listfile="book/PhingGuide.book"/>
</append>

B.3.2 Supported Nested Tags

  • filelist

  • fileset

  • filterchain