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 21:14:16 GMT
This is my work around. The downside is that I have to wait until the
exe completes before I see the output. I would rather see the output in
real time. If there is a redirector option to tee output in 1.6.3, I can
wait.

<for param="f">
   <path refid="mypath"/>
   <sequential>
      <exec executable="lamexe" input="@{f}" output="lamexe.log"/>
      <!-- dump output to log -->
      <concat>
         <filelist dir="." files="lamexe.log"/>
      </concat>
      <!-- scan output for error -->
      <loadfile property="lamexe.error" srcfile="lamexe.log">
         <filterchain>
            <linecontains>
               <contains value="ERROR"/>
            </linecontains>
         </filterchain>
      </loadfile>
      <fail if="lamexe.error"/>
   </sequential>
</for>

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


I can see about adding attributes to keep the log
output, but I'm at a loss with 1.6.2, then, unless you
want to write some custom code.

-Matt

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

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



		
__________________________________
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