ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@bost.de>
Subject Re: copy task not working
Date Mon, 13 Nov 2000 10:38:44 GMT
Jeroen Zwartepoorte <Jeroen@xs4all.nl> wrote:

> I've got a build script which has a compile task which does 2
> things: compile all the .java files in a directory and copy a .gif
> file to the output directory.
> 
> The second command doesn't get executed. Does anybody have any ideas
> what is wrong?

I think it gets executed, but the target file already exists and is
not older than the source file. In this case Ant will silently not
copy anything (use the overwrite attribute if this is not what you
want).

For example:

<project default="copytarget">
  <target name="copytarget">
    <copy file="testcopy.xml" tofile="foo.bar.xml" />
  </target>
</project>

bodewig@bodewig ~/jakarta/test >ant -f testcopy.xml 
Buildfile: testcopy.xml

copytarget:
     [copy] Copying 1 file to /home/bodewig/jakarta/test

BUILD SUCCESSFUL

Total time: 1 second


bodewig@bodewig ~/jakarta/test >ant -f testcopy.xml 
Buildfile: testcopy.xml

copytarget:

BUILD SUCCESSFUL

Total time: 1 second

The second invocation doesn't do anything, because nothing has
changed in testcopy.xml.

Stefan

Mime
View raw message