ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David McTavish <dmctav...@sandvine.com>
Subject RE: <touch> does not support 'if' attribute
Date Wed, 30 Jul 2003 17:59:07 GMT
<target name="run.junit-tests">
    <!-- do your junit stuff, set a property if necessary -->
    <antcall target="create.test-file"/>
</target>

<target name="create.test-file" if="${junit.property.set}">
    <!-- do whatever -->
</target>


d.

-----Original Message-----
From: Billy Bacon [mailto:billy.bacon@thirty3.net]
Sent: Wednesday, July 30, 2003 1:56 PM
To: Ant Users List
Subject: Re: <touch> does not support 'if' attribute


Not sure what you mean here EJ :-/

Could you explain a little bit more? What does expressly create the file
mean?

Do you mean create a target which contains an 'if' attribute and call the
target from my original target? Then the target which contains the 'if'
attribute would decide if it executes its tasks or not?

- Billy -


On 7/30/03 11:07 AM, "Ciramella, EJ" <ECiramella@emptoris.com> wrote:

> I'd have a target to expressly create the file.  This target would have an
> "if" attribute with a value of the property that you set (or did not set)
> earlier.
> 
> -----Original Message-----
> From: Billy Bacon [mailto:billy.bacon@thirty3.net]
> Sent: Wednesday, July 30, 2003 1:04 PM
> To: Ant Users List
> Subject: <touch> does not support 'if' attribute
> 
> 
> Does anyone have a work-around for this? I want to create a file on the
> system 'if' a property has been set within my ant target.
> 
> For example, In my target I have a <junit> task that sets a failed
property
> if one or more unit tests fail. Within the same target I want to create a
> file on the system (via the <touch> task) if and only if the failed
property
> is set. I also tried to use the <exec> task but this too doesn't support
the
> 'if' attribute.
> 
> Any ideas?
> 
> - Billy -
> 
> 
> ---------------------------------------------------------------------
> 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