You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Alan Andrade <aa...@contractor.epolicysolutions.com> on 2006/01/18 19:36:24 UTC

Exclude a directory

Hi

I am using the copy task.

I wasn't sure about the syntax to exclude a directory.

Eg:

Src

 |_____com

 |_____resource

 

I want to exclude resource directory

 

I wrote the task as 

 

<copy  todir=".\dist\war" >

               <fileset dir=".\src ">

               <exclude name="META-INF/*"/>

               </fileset>

      </copy>

 

This doesnot seem to work.

 

Thanks

Alan

 


Re: Exclude a directory

Posted by Frank Harnack <ha...@mail05.harlau.de>.
Hello,

with

<project name="yourproject" default="yourdefaulttarget" basedir=".">

....

 <copy  todir="dist/war" >

                <fileset dir="src ">

                <exclude name="resource/**/*"/>

                </fileset>

       </copy>
....

</project>

it should work.

Regards

Frank


Quoting Alan Andrade <aa...@contractor.epolicysolutions.com>:

> Hi
>
> I am using the copy task.
>
> I wasn't sure about the syntax to exclude a directory.
>
> Eg:
>
> Src
>
>  |_____com
>
>  |_____resource
>
>
>
> I want to exclude resource directory
>
>
>
> I wrote the task as
>
>
>
> <copy  todir=".\dist\war" >
>
>                <fileset dir=".\src ">
>
>                <exclude name="META-INF/*"/>
>
>                </fileset>
>
>       </copy>
>
>
>
> This doesnot seem to work.
>
>
>
> Thanks
>
> Alan
>
>
>
>





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Exclude a directory

Posted by Frank Harnack <ha...@mail05.harlau.de>.
The real problem is the space after "src" in
"<fileset dir="src ">", I suppose.

Regards Frank

----
Hello,

with

<project name="yourproject" default="yourdefaulttarget" basedir=".">

....

 <copy  todir="dist/war" >

                <fileset dir="src ">

                <exclude name="resource/**/*"/>

                </fileset>

       </copy>
....

</project>

it should work.

Regards

Frank

Quoting Alan Andrade <aa...@contractor.epolicysolutions.com>:

> Hi
>
> I am using the copy task.
>
> I wasn't sure about the syntax to exclude a directory.
>
> Eg:
>
> Src
>
>  |_____com
>
>  |_____resource
>
>
>
> I want to exclude resource directory
>
>
>
> I wrote the task as
>
>
>
> <copy  todir=".\dist\war" >
>
>                <fileset dir=".\src ">
>
>                <exclude name="META-INF/*"/>
>
>                </fileset>
>
>       </copy>
>
>
>
> This doesnot seem to work.
>
>
>
> Thanks
>
> Alan
>
>
>
>





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org