ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: FINALLY target?
Date Tue, 16 Sep 2003 06:30:23 GMT
You can also vote for 

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17973
"A <final> target just like a <init> target"

... maybe someone does the implementation then ... :-)


Jan



> -----Original Message-----
> From: Wascally Wabbit [mailto:wascallywabbit@earthling.net]
> Sent: Tuesday, September 16, 2003 1:48 AM
> To: Ant Users List
> Subject: Re: FINALLY target?
> 
> 
> 
> The http://www.antxtras.info/ package supports this also. Use 
> something like: 
> 
>    <target name="Whatever" ...>
>       <protect>
>           [stuff that might die...]
> 
>           <always>
>               [backup my stuff...]
>           </always>
>       </protect>
>    </target>
> 
> Also you can use the <iferror> task to do stuff in response to
> an exception.
> 
> - The Wabbit
> 
> 
> ----- Original Message -----
> From: "Leonardo Abreu de Barros" <leobarros@email.com>
> Date: Mon, 15 Sep 2003 14:23:31 -0000
> To: ant-user@jakarta.apache.org
> Subject: FINALLY target?
> 
> > Hi all,
> > 
> > Hope you can help me. I'm running a suite of tests on 
> directories with
> > real data so I need to backup all this data before I start 
> the tests.
> > This is done using a target "backup". As soon as all tests 
> get done, I
> > call another target that restores the original data. 
> > The problem is, when something goes wrong, the build fails and the
> > data isn't restored. 
> > Is there a way to always guarantee that this target will be called?
> > What I'm looking for is something similar to the "FINALLY" 
> keyword in
> > Java, applied to the concept of Ant builds.
> > Any idea how to accomplish this?
> > 
> > Thanks in advance,
> > Leonardo Barros
> 
> -- 
> __________________________________________________________
> Sign-up for your own personalized E-mail at Mail.com
> http://www.mail.com/?sr=signup
> 
> CareerBuilder.com has over 400,000 jobs. Be smarter about 
> your job search
> http://corp.mail.com/careers
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message