ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lull, Joe" <JL...@apogent.com>
Subject RE: condition execute task
Date Thu, 17 May 2001 14:19:39 GMT
Have your task that checks the log set a property and use that property to
determine what target to execute next.

example:  this.getProject().setProperty(mypropertyName, valueThatAntNeeds);

-----Original Message-----
From: Frederic Do Couto Fernandes
[mailto:f.docoutofernandes@frontoo.com]
Sent: Thursday, May 17, 2001 9:27 AM
To: 'ant-user@jakarta.apache.org '
Subject: condition execute task


I wonder if it is possible to exeute task in some conditions !

For example :

<target name="compile" ....>

...

  <record name="buildResult.log" action="start">
  <javac .....>
  </javac>
  <record name="buildResult.log" action="stop">

<!-- here, I want to send an email if the buildResult.log contains
     "BUILD FAILED".
     I have a class that check the buildResult.log file    -->

  <mail ....... files="buildResult.log"/>

...

</target>

Mime
View raw message