You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Sándor Tamás <to...@fw.hu> on 2005/08/09 10:40:44 UTC
howto include files only - without dirtree
Hi Ant-users!
I've checked the Directory-based Tasks page and googled the web to find
any solution to my problem, without success.
E.g. I have a dir tree like this:
/lib
|- jarlibname1
| |-file1.jar
| |-file2.jar
|- jarlibname2
|-file3.jar
|-file4.jar
What I like to do is include all the jar files found under /lib so the
result should look like:
/libsonly
|- file1.jar
|- file2.jar
|- file3.jar
|- file4.jar
The problem is with the
dir="lib" includes="**/*.jar"
expression , because this way subdirs also included. A workaround is to
list all my subdirs as includes, but it's not nice, and not recursively
automatic.
Is there a solution to this issue?
Thanks,
Thomas Sandor
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: howto include files only - without dirtree
Posted by Nicolas Vervelle <ni...@steria.com>.
Hi,
you can check the "flatten" attribute of <copy>, or also the flatten mapper.
Nicolas
Sándor Tamás wrote:
> Hi Ant-users!
>
> I've checked the Directory-based Tasks page and googled the web to
> find any solution to my problem, without success.
> E.g. I have a dir tree like this:
>
> /lib
> |- jarlibname1
> | |-file1.jar
> | |-file2.jar
> |- jarlibname2
> |-file3.jar
> |-file4.jar
>
> What I like to do is include all the jar files found under /lib so the
> result should look like:
>
> /libsonly
> |- file1.jar
> |- file2.jar
> |- file3.jar
> |- file4.jar
>
> The problem is with the
> dir="lib" includes="**/*.jar"
> expression , because this way subdirs also included. A workaround is
> to list all my subdirs as includes, but it's not nice, and not
> recursively automatic.
>
> Is there a solution to this issue?
>
> Thanks,
> Thomas Sandor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: howto include files only - without dirtree
Posted by Jeffrey E Care <ca...@us.ibm.com>.
<flattenmapper>
--
Jeffrey E. Care (carej@us.ibm.com)
WebSphere v7 Release Engineer
WebSphere Build Tooling Lead (Project Mantis)
Sándor Tamás <to...@fw.hu>
08/09/2005 04:40 AM
Please respond to
"Ant Users List"
To
user@ant.apache.org
cc
Subject
howto include files only - without dirtree
Hi Ant-users!
I've checked the Directory-based Tasks page and googled the web to find
any solution to my problem, without success.
E.g. I have a dir tree like this:
/lib
|- jarlibname1
| |-file1.jar
| |-file2.jar
|- jarlibname2
|-file3.jar
|-file4.jar
What I like to do is include all the jar files found under /lib so the
result should look like:
/libsonly
|- file1.jar
|- file2.jar
|- file3.jar
|- file4.jar
The problem is with the
dir="lib" includes="**/*.jar"
expression , because this way subdirs also included. A workaround is to
list all my subdirs as includes, but it's not nice, and not recursively
automatic.
Is there a solution to this issue?
Thanks,
Thomas Sandor
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org