ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lucas Albers" <smurfb...@hotmail.com>
Subject RE: any way to do this with Ant?
Date Tue, 18 Nov 2008 01:00:22 GMT
Catch try task for ant:
<project name="main" default="compile"
xmlns:antelope="antlib:ise.antelope.tasks">

<target name="dca-try">
   
    <exec dir="./blah" executable="cmd" osfamily="Windows"
failonerror="false">

      <arg line="blah blah blah "/>

    </exec>
    
    <antelope:try>
      <echo message="logging blah:${logdir}/dca.log"></echo>
      <record name="${logdir}/blah.log" emacsmode="true" append="no"
action="start"></record>  

      <exec dir="./blah" executable="cmd" osfamily="Windows"
failonerror="true">

        <arg line="blah"/>

      </exec>
      <record name="${logdir}/blah.log"  action="stop"></record>

      <antelope:catch>
        <property name="build.failed" value="blah"/>
      </antelope:catch>
      <antelope:finally>
        <!-- rollback files -->
        <fail message="blah  compile failed">
          <condition >
            <matches pattern="blah Compile Failed"
string="${build.failed}"/>
          </condition>
        </fail>        
      </antelope:finally>
    </antelope:try>
  </target>




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


Mime
View raw message