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 Brown <ab...@symyx.com> on 2004/07/27 23:52:44 UTC

copying question...

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


Re: copying question...

Posted by Matt Benson <gu...@yahoo.com>.
If the glob mapper isn't flexible enough to allow you
to remove one directory regardless of whether it is m,
n or p (or q six months from now--I assume that's what
you want), the regexp mapper may help.

-Matt


--- Alan Brown <ab...@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!?
Yahoo! Mail - 50x more storage than other providers!
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


Re: copying question...

Posted by Matt Benson <gu...@yahoo.com>.
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 <ab...@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