ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: Copying a file recursively
Date Mon, 30 Jul 2001 17:32:46 GMT
Perhaps I'm not reading this correctly, but you are trying to shell to 
the OS and execute cp, yes?  If so, cp will work just dandy for *nix 
but for Windows machines you are looking for copy (unless you have a 
cp.bat file which essentially aliases copy)

Is there a problem using the <copy/> task?  


-----Original Message-----
From: sdgoldst []
Sent: Monday, July 30, 2001 12:27 PM
To: ant-user
Cc: sdgoldst
Subject: Copying a file recursively

I'm attempting to copy a file recursively throughout a directory tree.  
is the target that I'm trying:

<target name="make" depends="init">
    <apply executable="cp" dest="." dir="." type="dir" 
	 <fileset dir=".">
	      <patternset refid="all.sources"/>
	 <mapper type="merge" to="file_to_copy"/>

where the all.source pattern is

    <patternset id="all.sources">
	    <include name="**/*.java"/>

When I run ant with verbose and debug options, I get the following 
output for 
this target:

    [apply] Myos = Windows NT
    [apply] cp

Can anyone give me some hints on how to fix this?  Thanks.


"Just a mirror for the sun...
 My smiling eyes are just a mirror for the sun."

View raw message