ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Moulder" <>
Subject RE: echo message does not translate properties
Date Fri, 20 Oct 2000 23:25:09 GMT
In a non-convoluted way? No.
In a slightly less than obvious way?  Try:

     <target name="check_for_optional_packages">
         <available property="jsdk2.2.present"
 classname="javax.servlet.jsp.PageContext" value="false"/>

     <target name="env" depends="check_for_optional_packages">
         <echo message="jsdk2.2 = ${jsdk2.2.present}"
         <echo message="jsdk2.2 = false" unless="${jsdk2.2.present}" />

I believe this will work.  Like I said, a bit kludgey, but if you don't
mind a duct tape and bailing wire sort of approach, it works.


> -----Original Message-----
> From: Christopher Elkins []
> Sent: Friday, October 20, 2000 4:29 PM
> To:
> Subject: Re: echo message does not translate properties
> > Yes, the available tag only sets the property if the file/class is
> > available.  This is a good thing since the if/unless does
> the same check,
> > not to check and see if they meet any condition.
> >
> Thanks. I just re-read the docs and now realize I completely
> misunderstood the
> purpose of that value attribute.
> Here's what I'd like to do: if a specific class is present,
> print "true"; if
> it's not, print "false". If I use the value tag properly, I
> can get "true" when
> it's present. However, when it's not, I just get the property
> identifier; I'd
> like to get "false".  Is this possible in a non-convoluted way?

View raw message