ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Brown" <abr...@symyx.com>
Subject RE: copying question...
Date Wed, 28 Jul 2004 16:16:36 GMT

Thanks Matt, I didn't realize the power of the regexp mapper.  That was
perfect.  A great little tutorial too!

alan

-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com]
Sent: Tuesday, July 27, 2004 3:32 PM
To: Ant Users List
Subject: Re: copying question...

For fun, I did this, which works with jakarta-oro:

<copy todir="root2" includeemptydirs="false">
  <fileset dir="root" includes="**/*.java" />
  <mapper type="regexp"
          from="^([^/\\]+[/\\]).+[/\\](.*)"
          to="\1\2" />
</copy>

-Matt

--- Alan Brown <abrown@symyx.com> wrote:

>
> I have a directory structure of
>
> root/a/m/**/*.java
> root/a/n/**/*.java
> root/c/p/**/*.java
>
> And I'd like them all to
>
> Root2/a/**/*.java
> root2/a/**/*.java
> root2/c/**/*.java
>
> I've looked at the 'grob' mapper and I've fiddled
> around no end with
> filesets but there doesn't seem to be a way to do
> this with the regular
> tasks (ie, without using foreach).
>
> Is there a way to do this?  I'm running the ant task
> from root2 and have
> access to the value of 'root'.
>
>
>
>
>
> =======
> Notice: This e-mail message, together with any
> attachments, contains
> information of Symyx Technologies, Inc. that may be
> confidential,
> proprietary, copyrighted, privileged and/or
> protected work product,
> and is meant solely for the intended recipient. If
> you are not the
> intended recipient, and have received this message
> in error, please
> contact the sender immediately, permanently delete
> the original and
> any copies of this email and any attachments
> thereto.
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
>
>



	
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

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


=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. that may be confidential,
proprietary, copyrighted, privileged and/or protected work product,
and is meant solely for the intended recipient. If you are not the
intended recipient, and have received this message in error, please
contact the sender immediately, permanently delete the original and
any copies of this email and any attachments thereto.

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


Mime
View raw message