ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: parsing a task output for further processing
Date Wed, 12 Jun 2002 15:25:07 GMT
--- Marc Logemann <devlists@logemann.info> wrote:
> <taskdef name="tclist"     
> classname="org.apache.catalina.ant.ListTask"/>
> 
> <target name"foo">
> 
> <tclist  url="${catalina.url}" username="${catalina.username}"
> password="${catalina.password}"/>

> </target>

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

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message