DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29011>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29011 Enhance the <copy/>-tag to support filesets for both source *and* destination ------- Additional Comments From [EMAIL PROTECTED] 2004-05-17 12:52 ------- I had written a template for my own: <project name="common-define-treecopy"> <scriptdef name="treecopy" language="javascript"> <element name="src" type="fileset"/> <element name="dest" type="dirset"/> <![CDATA[ // use 'copy' task for doing the real work copy = project.createTask("copy"); // for logging purposes ... copy.setTaskName("treecopy"); // add all source filesets srcFilesets = elements.get("src"); for (i=0; i<srcFilesets.size(); i++) { copy.addFileset(srcFilesets.get(i)); } // now do the work for each destination directory for (i=0; i<elements.get("dest").size(); i++) { dirset = elements.get("dest").get(i); dirscanner = dirset.getDirectoryScanner(project); dirs = dirscanner.getIncludedDirectories(); for (j=0; j<dirs.length; j++) { todir = new java.io.File(dirscanner.getBasedir(), dirs[j]); copy.setTodir(todir); copy.perform(); } } ]]> </scriptdef> </project> Just <import> it and use it nearly as your example: <treecopy> <src dir="."> <include name="${copyfilename.file}"/> </src> <dest dir="."> <include name="*"/> </dest> </copy> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]