You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Mikael Petterson (KI/EAB)" <mi...@ericsson.com> on 2007/02/06 19:57:03 UTC

Delete files if error log exist

Hi,

I would like to confirm with you experts if I can write ( as below) to
delete some files if an
error log exist. Or is there a better way?

Cheers,

//mikael 


<available file="${log.dir}/${log}" type="file"
property="error.log.exist"/>
        <fail message="ERROR: Probable errors in the mom. Check
'error.log' in ${log.dir}" if="error.log.exist">
         <!--When generation fails. Remove all files since
we don't want the wrong files to be checked in.-->
         <delete>
          <fileset dir="${output.dir}/${gen.pkg}" includes="**/*.java"/>
         </delete>
       </fail>