Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

AW: AW: Using anteater in ant

Jan Materne

2010-04-14


Author LoginPost Reply
No idea.
Have you asked on the anteater user list?

Jan

> -----Ursprüngliche Nachricht-----
> Von: Pooja Ganapathi [mailto:pooja.ganapathi@(protected)]
> Gesendet: Mittwoch, 14. April 2010 07:09
> An: user@(protected)
> Betreff: Re: AW: Using anteater in ant
>
>
> hi,
>
> here is the URL -->
> http://aft.sourceforge.net/manual/Test%20tasks.html#elem:responseCode
>
> If you just scroll down, you might see the code like this :
>
> **********************************************
>
> This is useful in conjunction with a property setter:
>
> <httpRequest href="some URL">
>  <match assign="ok">
>   <responseCode pattern="2.."/>
>  </match>
>  <match assign="redirected">
>   <responseCode pattern="3.."/>
>  </match>
>  <if>
>   <isset property="redirected"/>
>   <then>
>     <echo>We were redirected... </echo>
>   </then>
>  </if>
> </httpRequest>
> *******************************************************
>
> As with using <if>, outside <httprequest>, the build doesn't
> recognise it.
> Say that the build fails in the match.. and thus 'var' is not
> assigned. It
> doesn't go to the if statement et all..but directly..it fails.
>
> I have put the <httprequest> under <trycatch> and thus, as soon as it
> encounters error, it goes to <catch> and fails out.
>
> -Pooja
>
>
> Jan.Materne wrote:
> >
> >> in match,which i could use later with <if> condition. The
> >> anteater manual page (test tasks) decribes the same,
> >
> > I havent found that on http://aft.sourceforge.net/ could
> you post the
> > url?
> >
> >
> >
> >> <httprequest>
> >> <match>
> >>  <regexp assign ="var">${var1}</regexp>
> >> </match>
> >> <if>
> >> <isset property="var"/>
> >> <then>
> >> <do somethin>
> >> </then>
> >> </if>
> >> </httprequest>
> >>
> >> The same code example as been given in the manuals too.
> >> however, when ran it
> >> gave the below error.
> >> "The <httpRequest> task doesn't support the nested "if" element."
> >>
> >> Any help please?
> >
> >
> > Maybe the if/then/else should be outside of <httprequest> and done
> > external tasks?
> >
> > <aft:httprequest>
> >   <aft:match>
> >      <aft:regexp assign="var"....
> > </aft:httprequest>
> > <antcontrib:if>
> >   <isset property="var"/>
> >   <antcontrib:then> ....
> > </antcontrib:if>
> >
> >
> > Jan
> >
> >
> >>
> >> Regards,
> >> Pooja
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Using-anteater-in-ant-tp28215650p28215650.html
> >> Sent from the Ant - Users mailing list archive at Nabble.com.
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/Using-anteater-in-ant-tp28215650p28238396.html
> Sent from the Ant - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.