xdoclet.ant

Class ReplaceCopy


public class ReplaceCopy
extends Copy

Extension of Ant's Copy task that uses XDoclet's template engine to copy instead of Ant's plain copy. It will scan each file for occurrences of <XDtAnt:property name="some.ant.property"/> and replace them with the associated Ant property value.

This is similar to using the standard <copy> Ant built-in task with a nested <filterset> element, but this task uses a pull mechanism (ant properties are pulled from the ant environment by the copied files) instead of a push mechanism (where Ant pushes explicit values into the copied files).

Version:
$Revision: 1.14 $
Author:
Aslak Hellesxy
created
5. januar 2002
To do:
Write docs!!!!!!!!!!!!!!!!!

Constructor Summary

ReplaceCopy()

Method Summary

protected void
doFileOperations()
Overridden doFileOperations() as Ant suggests.

Constructor Details

ReplaceCopy

public ReplaceCopy()

Method Details

doFileOperations

protected void doFileOperations()
Overridden doFileOperations() as Ant suggests. It would be less copy-paste if fileUtils.copyFile in the superclass' method used getFileUtils().copyFile instead. Then we could just override getFileUtils() and return a FileUtils subclass which used XDoclet template engine. Until Ant fixes this, we'll do inheritance by copy/paste :-(