Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 8073 invoked from network); 21 Jun 2002 14:36:05 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 21 Jun 2002 14:36:05 -0000 Received: (qmail 15909 invoked by uid 97); 21 Jun 2002 14:35:50 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 15892 invoked by uid 97); 21 Jun 2002 14:35:49 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 15880 invoked by uid 98); 21 Jun 2002 14:35:48 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: From: Dominique Devienne To: "'Ant Users List'" Subject: RE: ?? A Clean-Up Task that Always Runs ?? Date: Fri, 21 Jun 2002 09:35:31 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N A low-cost solution to that problem is to create your own myant script that calls the normal (unchanged) ant script. You then have the choice of executing your 'finally' target only when the build succeeds (by appending your target name to the list of targets), or always (by calling ant a second time): ---- myant.bat (execute finally on build success only) ---- @echo off setlocal ant %* finally ---- myant.bat (execute finally on build success or failure) ---- @echo off setlocal ant %* ant finally --DD PS: Bourne/Bash script version left as an exercise to the reader ;-) -----Original Message----- From: Lyndon Samson [mailto:samson@ozemail.com.au] Sent: Friday, June 21, 2002 12:09 PM To: Ant Users List Subject: Re: ?? A Clean-Up Task that Always Runs ?? It's pretty tricky, the easiest way is to change the [.bat|.sh] that runs ANT to append cleanUp after the list of supplied targets. Trying to do the same in an ANT script is problematic as Main calls Project.executeTargets(Vector) but the Vector of targets to call is not available outside that method. The Project class does have a fireBuildFinished method which informs each listener that the build is finished, so maybe you could write a listener to run an arbitary build file when it gets that message? -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: