On Mon, Feb 1, 2010 at 9:18 PM, Stefan Bodewig <bode...@apache.org> wrote: > I think you need includeemptydirs="true" on the <sync> element as well. > > Stefan
Thanks Stefan! Here's the working snippet in case anyone else runs into this problem: <sync todir="${build.tomcat}" failonerror="true" overwrite="true" includeemptydirs="true"> <fileset dir="${tomcat.template}"> <exclude name="logs/**/*"/> <exclude name="work/**/*"/> <exclude name="temp/**/*"/> </fileset> </sync> Unfortunately, once I got this worked out I soon stumbled on ant's difficulty with permissions, which prevents executing tomcat's scripts in the bin directory. --- Begin Reference --- http://ant.apache.org/manual/CoreTasks/copy.html Unix Note: File permissions are not retained when files are copied; they end up with the default UMASK permissions instead. This is caused by the lack of any means to query or set file permissions in the current Java runtimes. If you need a permission-preserving copy function, use <exec executable="cp" ... > instead. --- End Reference --- So I decided to go with a native call to rsync instead: <exec executable="rsync" os="Linux" > <arg line="-avzC --exclude=/logs/* --exclude=/work/* --exclude=/temp/* ${tomcat.template}/ ${build.tomcat}"/> </exec> --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org