ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: <fail> silently
Date Tue, 26 Jul 2005 16:24:20 GMT
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"/>
         <condition property="@{property}"> ...

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


>-----Urspr√ľngliche Nachricht-----
>Von: Jay Burgess [] 
>Gesendet: Dienstag, 26. Juli 2005 18:17
>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".
>| Jay Burgess [Vertical Technology Group] "Essential Technology Links"
>To unsubscribe, e-mail: For 
>additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message