ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: 1.5b2 and TaskDefs 'override' warnings
Date Mon, 10 Jun 2002 14:09:29 GMT
But isn't this a bug Stefan!?!?!

You give us a solution that works around the bug (?), but don't explain why
when using <ant>/<antcall> (which reparses the build file, and thus
re-performs a lot of processing) the 'global' <taskdef>s are simply ignored.

Otherwise, all targets using a custom task/type have to use an idiom like:

<target name="taskdef" unless="taskdef.done">
  <taskdef ... />
  <typedef ... />
  <property name="taskdef.done" value="" />
</target>

<target name="do-something" depends="taskdef">
  ...
</target>

and never put a <taskdef>/<typedef> at global scope. --DD

-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org] 
Sent: Monday, June 10, 2002 8:58 AM
To: ant-user@jakarta.apache.org
Subject: Re: 1.5b2 and TaskDefs 'override' warnings

On Mon, 10 Jun 2002, Marc Gemis <marc.gemis.mg@belgium.agfa.com>
wrote:

> This was not the case in 1.4.1.

Yes, 1.4.1 wouldn't tell you that you were overriding an existing
taskdef at all.

> Or should I somehow change my build-file ?

Don't <taskdef> your task unless you need it.  Only <taskdef> it once
(i.e. don't <taskdef> it again in the part that gets called by
<ant*>).

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message