ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <Brian.D...@FMR.com>
Subject RE: Loadfile not loading file
Date Wed, 18 Aug 2004 20:51:44 GMT
The output file can contain good stuff, too. And I want to see it in the
log.

-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@yahoo.com] 
Sent: Wednesday, August 18, 2004 4:45 PM
To: Ant Users List
Subject: RE: Loadfile not loading file


--- "Dick, Brian E." <Brian.Dick@FMR.com> wrote:

> Thanks for <for>. It is definitely better than
> <foreach>.
> 
> I can't wrap the for with a single <record
> action="start"> and <record action="stop">
> Pair. I'm running an <exec> in the <for> body that
> doesn't set a return code on failure. I need to scan
> the scan the output of each iteration of the <exec>
> to check for an ERROR string.
> 

hmmm... what about:

<for param="f">
  <path refid="yourpath">
  <sequential>
    <delete file="errorfile" />
    <exec executable="yourexe">
      <redirector output="errorfile"
                  createemptyfiles="false">
        <outputfilterchain>
          <linecontains>
            <contains value="ERROR" />
          </linecontains>
        </outputfilterchain>
      </redirector>
    </exec>
    <fail message="ERROR with @{f}">
      <condition>
        <available file="errorfile" type="f" />
      </condition>
    </fail>
  </sequential>
</for>

-Matt


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
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