ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pooja Ganapathi <pooja.ganapa...@gmail.com>
Subject RE: To set property on any build status
Date Fri, 09 Apr 2010 07:39:57 GMT

Hey Gilbert,

Thanks, that was a useful info on try\catch. I implemented it in my script,
and it was good.
However, when I tried to catch any exception, it didn't do that well.

basically, I have a main target, which does couple of tasks -this I have put
under try and have set exception message too in <trycatch>. So, my <catch>
gets the exception message as "Build failed".

What am looking is a brief note on which sub task caused exception.

<trycatch property = "exception" reference ="exception_ref">
<try>
      <task1/>
     <task2/>


    <mail/> --> success email
</try>

<catch>
<mail/> -- failure email ${exception}
</catch>

</trycatch>

It looks like i can't have multiple try\catch. :(

any ideas pls!!!!!!!!

-Pooja





mgainty wrote:
> 
> 
> setup a log for output parameter for all tasks
> concatenate (append) results for each task onto log(.properties)
> 
>  
> 
> if your output is in properties file format e.g. key=value
> 
> any build.xml will be able to read those property attributes later on e.g.
> 
>  <property file="log.properties"/>
> 
>  
> 
> http://ant.apache.org/manual/CoreTasks/property.html
> 
>  
> 
> hth
> Martin Gainty 
> ______________________________________________ 
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
> 
>  
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
> dient lediglich dem Austausch von Informationen und entfaltet keine
> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire
> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la
> copie de ceci est interdite. Ce message sert à l'information seulement et
> n'aura pas n'importe quel effet légalement obligatoire. Étant donné que
> les email peuvent facilement être sujets à la manipulation, nous ne
> pouvons accepter aucune responsabilité pour le contenu fourni.
> 
> 
> 
>  
> 
>> Date: Thu, 8 Apr 2010 05:14:49 -0700
>> From: pooja.ganapathi@gmail.com
>> To: user@ant.apache.org
>> Subject: To set property on any build status
>> 
>> 
>> hi,
>> 
>> I need my ant build to sent mails based on success or failure of build.
>> 
>> In brief, after the build, i want to capture the status of the build as a
>> property, so that based on the property, different emails could be send.
>> 
>> Could any one guide me how to acheive this?
>> 
>> Note: i don't want Maillogger :)
>> 
>> -Pooja
>> -- 
>> View this message in context:
>> http://old.nabble.com/To-set-property-on-any-build-status-tp28177664p28177664.html
>> Sent from the Ant - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>> 
>  		 	   		  
> _________________________________________________________________
> Hotmail is redefining busy with tools for the New Busy. Get more from your
> inbox.
> http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
> 

-- 
View this message in context: http://old.nabble.com/To-set-property-on-any-build-status-tp28177664p28188702.html
Sent from the Ant - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message