ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Zwartepoorte" <Jer...@xs4all.nl>
Subject Re: copy task not working
Date Mon, 13 Nov 2000 10:59:08 GMT
Thanks for the info. I managed to find & fix the problems:
- I was using {$variable} instead of the correct ${variable}.
- To know i did the above wrong, i got the latest version from cvs and that
version generated an error during the build. I was using the 1.2
distribution before that.

Jeroen

----- Original Message -----
From: "Stefan Bodewig" <bodewig@bost.de>
To: <ant-user@jakarta.apache.org>
Sent: Monday, November 13, 2000 11:38 AM
Subject: Re: copy task not working


> 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