Sorry, I was thinking the property would be set even if file were empty (or filtered so that it appeared empty).
-Matt --- "Dick, Brian E." <[EMAIL PROTECTED]> wrote: > Fortunately, I want to fail the first time the > property is set. It's > immutability is mute. > > -----Original Message----- > From: Matt Benson [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 18, 2004 5:19 PM > To: Ant Users List > Subject: RE: Loadfile not loading file > > > I was about to write back and suggest something like > this. However, be careful using <loadfile>. It > looks > like property immutability will stop you from > detecting the error condition in any but the first > file. Unfortunately (and I hate temp files worse > than > almost anything in programming) I would recommend > using two <concat> tasks, one to display to the > console and the other to filter to a temp file > instead > of a property. The other option is to "pollute" > your > properties by using a discrete property name > including > @{f} for each list value. > > -Matt > > --- "Dick, Brian E." <[EMAIL PROTECTED]> wrote: > > > 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:[EMAIL PROTECTED] > > 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." <[EMAIL PROTECTED]> wrote: > > > > > The output file can contain good stuff, too. And > I > > > want to see it in the > > > log. > > > > > > -----Original Message----- > > > From: Matt Benson [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, August 18, 2004 4:45 PM > > > To: Ant Users List > > > Subject: RE: Loadfile not loading file > > > > > > > > > --- "Dick, Brian E." <[EMAIL PROTECTED]> 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: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! Mail - 50x more storage than other > providers! > > http://promotions.yahoo.com/new_mail > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail is new and improved - Check it out! > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > === message truncated === __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
