Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 75134 invoked from network); 6 Nov 2001 15:52:55 -0000 Received: from unknown (HELO osaka.betaversion.org) (192.18.49.133) by daedalus.apache.org with SMTP; 6 Nov 2001 15:52:55 -0000 Received: (qmail 22372 invoked from network); 6 Nov 2001 15:55:22 -0000 Received: from nagoya.betaversion.org (192.18.49.131) by osaka.betaversion.org with SMTP; 6 Nov 2001 15:55:22 -0000 Received: (qmail 11865 invoked by uid 97); 6 Nov 2001 15:52:49 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 11847 invoked by uid 97); 6 Nov 2001 15:52:49 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 11836 invoked from network); 6 Nov 2001 15:52:48 -0000 Message-ID: <015b01c166da$a806dbd0$0100a8c0@jose> From: "Jose Alberto Fernandez" To: "Ant Developers List" References: <200110300944.f9U9iW215215@mail016.syd.optusnet.com.au><027a01c1625f$7968a1c0$7691070f@cv.hp.com> <008801c165e5$edd5c310$0100a8c0@jose> Subject: Re: Expressing BuildListeners (was Re: [Ant2] Tasks as siblings of ) Date: Tue, 6 Nov 2001 15:49:24 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N From: "Stefan Bodewig" > On Mon, 5 Nov 2001, Jose Alberto Fernandez > wrote: >=20 > > One of the problems I have with how to define BuildListeners inside > > Buildfiles is how to mannage and tasks. When I made > > a recursive call using do I create new listener instances? >=20 > Unless you guard against it with some properties or something, this is > what would happen in the current implementation. >=20 Well, there is no current implementation of what I was thinking on doing (not using a task for the declaration) ;-) > If only reuses the same object tree as the parent build, we > should be able to avoid that. >=20 Very true. But that will be only possible in ANT2, while I was thinking more in ANT1. I guess the problem we have is that listeners (as currently defined) are not as much a feature of Project but of the JVM executing it. For = example when you call to another project,while a listener is active, I = would expect to receive event from the subtasks.=20 So they are not really a Project thing I guess they get inherited. > > Notice that tasks similar to and are fine as long > > as one knows such composition may be instantiated multiple times. >=20 > Why is OK here? It could overwrite an existing logfile (at > least on file systems where Java doesn't lock files it is writing to). >=20 Looking at documentation, it really keeps track of things on = its own static table which is not Project dependent. It looks better than I originally thought :-) 1) I would have prefer to also work as a TaskContainer which would allow for the listener to be added and removed from the project when not needed anymore. The current code lives the recorders runnning = forever. 2) I think "setName(String fname)" should be "setName(File fname)" that would guarantee that there is no clashes when different subbuilds = in=20 different basedirs use the same local filename. 3) I think would suffice if it where allowed to be declared outside targets. After all is just another declaration. Jose Alberto -- To unsubscribe, e-mail: For additional commands, e-mail: