Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: How can I exclude a directory's contents but not the directory itself?

Stefan Bodewig

2010-02-02

Replies: Find Java Web Hosting

Author LoginPost Reply
On 2010-02-01, Jonathan Gordon <ant.user@(protected):

> Perhaps I wasn't clear enough. At the bottom of my original mail I
> included the following ant snippet, which is NOT correct for my
> particular situation:

> <sync todir="${build}/tomcat" failonerror="true" overwrite="true">
>         <fileset dir="${tomcat}">
>           <exclude name="logs/*"/>
>           <exclude name="work/*"/>
>           <exclude name="temp/*"/>
>         </fileset>
>      </sync>

> While that's excluding the directory contents, it's also excluding the
> directories themselves. I would like the excluded directories, but not
> their contents. How can I do that?

I think you need includeemptydirs="true" on the <sync> element as well.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.