As best as I can see it, I am only defining it once.
This is the situation:
There are 2 files: Main.xml and tools.xml.
In Main.xml (directly inside the project element) I have:
<import file="tools.xml"/>
Inside targets in Main.xml I use the copy.compile.post macro.
In tools.xml (also directly inside the project element) I have:
<macrodef name="copy.compile.post">
.
.
.
</macrodef>
...along with a dozen other macros.
copy.compile.post is the only macro that Ant complains about, and it only
complains some of the time (I haven't been able to see a pattern about when
it complains).
-David
-----Original Message-----
From: Peter Reilly [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 09, 2005 15:25
To: Ant Users List
Subject: Re: Why "Trying to override old definition of task xxx" message?
Looks like you are redefining a macrodef.
For exmple:
<target name="compile" depends="copy">
<macrodef name="doit" .../>
<doit/>
</target>
<target name="copy">
<macrodef name="doit" .../>
<doit/>
</target>
Would cause the macro "doit" to be defined twice.
Normally, one would place macrodefs outside of targets
and give them different names.
<macrodef name="copy_it".../>
<macrodef name="compile_it" ../>
<target name="compile" depends="copy">
<compile_it/>
</target>
<target name="copy">
<copy_it/>
</target>
Peter
David Resnick wrote:
>I have a project with a dozen macrodef definitions. Today I added 2 more
and
>now get the message "Trying to override old definition of task xxx" for one
>of the new macros at the start of most targets. The message doesn't seem to
>have any effect on the build, but I would like to know why it suddenly
>appeared.
>
>
>
>Does anyone know?
>
>
>
>Thanks, David
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]