----- Original Message -----
From: "Marc Logemann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 12, 2002 8:36 AM
Subject: Re: parsing a task output for further processing


> > If you're running Ant1.5, and assuming <tclist> has an option to write
its
> > output to a file (which, if it doesn't, would definitely be bad, but I
> > suppose you could work around it in the meantime by bracketing your
> > <tclist> in a <record>):
>
> >   <property name="app" value="maxbahr"/>
>
> >   <target name="stopApp" depends="chkAppStatus" if="app.running">
> >     <echo>Stopping ${app}...</echo>
> >     <tcstop  url="${catalina.url}" username="${catalina.username}"
> >              password="${catalina.password}" path="/${app}"/>
> >   </target>
>
> >   <target name="chkAppStatus">
> >     <loadfile property="app.running" srcFile="tclist.out">
> >       <filterchain>
> >         <linecontains>
> >           <contains value="/${app}:running"/>
> >         </linecontains>
> >       </filterchain>
> >     </loadfile>
> >   </target>
>
> Diane, thx for this great solution. It seems i ve missed some important
commands
> in Ant like <loadfile> or <filterchain>.
>
> Cause tclist cant output to file (IMO) i will also look up your mentioned
<record>
> command.


if you want to go this contrived route, grab the try/catch task from
ant-contrib.sourceforge.net and just catch the failed attempt to unload and
keep going.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to