ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jay Burgess <li...@vtgroup.com>
Subject RE: <fail> silently
Date Tue, 26 Jul 2005 17:56:54 GMT
Thanks for the idea. It sounds promising.

Jay 

-----Original Message-----
From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de] 
Sent: Tuesday, July 26, 2005 11:24 AM
To: user@ant.apache.org
Subject: AW: <fail> silently

Just my few cents:

Define the "check" logic in a <macrodef>. 
- if the check passes, set a property
- property name is provided as <attribute>
Define three new check-targets: ProductA.check, ProductB.check, ProductC.check
- contains the call to that macrodef providing different property-names
The ProductX-targets depend on the check target and are conditional to the property

<macrodef name="check">
    <attribute name="property"/>
    <sequential>
         <condition property="@{property}"> ...
    </sequential>
</macrodef>

<target name="ProductA.check">
    <check property="ProductA.passed"/>
</target>
<target name="ProductA" depends="ProductA.check" if="ProductA.passed">
    ...
</target>



Jan
 

>-----Urspr√ľngliche Nachricht-----
>Von: Jay Burgess [mailto:lists@vtgroup.com] 
>Gesendet: Dienstag, 26. Juli 2005 18:17
>An: user@ant.apache.org
>Betreff: <fail> silently
>
>I've got a script that contains a number of build commands for 
>various products e.g.
>
>ant check build ProductA
>ant check build ProductB
>ant check build ProductC
>
>What I want to do is run "check" for each product, and if a 
>product is not valid for this run, exit that specific Ant 
>invocation quietly and move on to the next line. 
>Unfortunately, while I can accomplish this with the <fail> 
>task, I get a nasty BUILD FAILED message which is not really the case.
>
>Is there a way, using Core Tasks, to test and "fail silently".
>
>Thanks.
>
>Jay
>
>| Jay Burgess [Vertical Technology Group] "Essential Technology Links"
>| http://www.vtgroup.com/
>
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For 
>additional commands, e-mail: user-help@ant.apache.org
>
>

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








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


Mime
View raw message