ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Copy to remote machine
Date Tue, 12 Apr 2005 13:46:15 GMT
why not just

    <copy todir="${target.dir}/archives">
       <fileset dir="."/>
    </copy>

? You only have to ensure that ${target.dir} is not under your basedir (.)
for
recursion possibility.


Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Dick, Brian E. [mailto:Brian.Dick@FMR.com]
> Gesendet am: Dienstag, 12. April 2005 15:43
> An: Ant Users List
> Betreff: Copy to remote machine
> 
> I need to copy a directory of files to a remote machine. I want to
> maintain the same relative directory structure on the remote 
> machine as
> defined by the local machine. Only the top level directories are
> different between the two machines.
> 
> The following works, but is it the best way to accomplish this task?
> 
> <target name="deploy">
>    <pathconvert targetos="windows" property="target.dir">
>       <path>
>          <pathelement location="."/>
>       </path>
>       <map from="c:\projects\distapp" to="\\remotehost\c$\prodapp"/>
>    </pathconvert>
> 
>    <copy todir="${target.dir}/archives">
>       <fileset dir="archives"/>
>    </copy>
> </target>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message