Yes it's a bug, imho. Especially since it is new behavior with 1.5. It completely screws up using xml include files to include common tasks in multiple projects which call each other. This will be the case in *any* build of reasonable complexity.
At the very *least* the WARNING should be changed to a VERBOSE. I guess those who don't think this is a bug either don't use XML includes or don't have builds that have more than one build file? Make the warnings stop! ----- Original Message ----- From: "Dominique Devienne" <[EMAIL PROTECTED]> To: "'Ant Users List'" <[EMAIL PROTECTED]> Sent: Monday, June 10, 2002 7:09 AM Subject: RE: 1.5b2 and TaskDefs 'override' warnings > 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:[EMAIL PROTECTED]] > Sent: Monday, June 10, 2002 8:58 AM > To: [EMAIL PROTECTED] > Subject: Re: 1.5b2 and TaskDefs 'override' warnings > > On Mon, 10 Jun 2002, Marc Gemis <[EMAIL PROTECTED]> > 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:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
