ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: How can I exclude a directory's contents but not the directory itself?
Date Tue, 02 Feb 2010 05:18:34 GMT
On 2010-02-01, Jonathan Gordon <> wrote:

> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message