That's an excellent question! I haven't dug into the Ant code deeply enough to answer that. It's been years since I wrote the remote extensions.
Does a Target or Task class exist for the lifetime of the project, or are references to them created when the Task/Target is started and removed when they complete? If the later, it seems that there must be some set of criteria which could uniquely identify it without depending on the underlying class instance. Though I suppose this could cause troubles with any parallel tasks... Cheers, Robert On 2/28/06, Martijn Kruithof <[EMAIL PROTECTED]> wrote: > What would be the criteria for two taks / targets to be equal in the > normal ant context? > > Normally I would say two distinct tasks / targets are never equal? > > Martijn > > > Robert Smith schreef: > > >Hi all, > > > >Quite some time ago, I wrote a RemoteAnt implementation to allow > >portions of an Ant build to run remotely with synchronous logging back > >to the main Ant instance. You can find it at > >http://confluence.public.thoughtworks.org/display/CC/RobertsRemoteAnt. > > > >I've hit a problem with the XmlLogger class, however. The XmlLogger > >uses a hashtable to store references to tasks and targets as the build > >progresses. The problem is that the Task and Target classes do not > >overide the equals() and hashcode() methods. This causes problems for > >me as I am creating local Tasks and Targets to represent those running > >on the remote machine. However, when the XmlLogger goes to check the > >hashtable when a Task completes, it's not finding the local Task that > >was created when the remote Task started. > > > >Would it be possible to implemnent the equals() and hashCode() methods > >for Task and Target using only String values (such as project name, > >task name, etc.)? > > > >I'd be happy to submit a patch if you like. I just wanted to check > >here first to see if such a thing would be accepted. > > > >Many thanks, > > > >Robert > > > >--------------------------------------------------------------------- > >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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]