ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Elkins" <celk...@scardini.com>
Subject Re: echo message does not translate properties
Date Fri, 20 Oct 2000 21:29:17 GMT

> 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?

> --Wes
>

--
Christopher Elkins


> > -----Original Message-----
> > From: Christopher Elkins [mailto:celkins@scardini.com]
> > Sent: Friday, October 20, 2000 4:21 PM
> > To: ant-user@jakarta.apache.org
> > Subject: Re: echo message does not translate properties
> >
> >
> >
> > Sorry, my bad. I should have elaborated, especially
> > considering that my
> > situation isn't exactly the same as the one in the original message.
> >
> > Ant version = 1.2rc2
> >
> > Build file
> > ----------
> >     <target name="check_for_optional_packages">
> >         <available property="jsdk2.2.present"
> > classname="javax.servlet.jsp.PageContext" value="false"/>
> >     </target>
> >
> >     <target name="env" depends="check_for_optional_packages">
> >         <echo message="jsdk2.2 = ${jsdk2.2.present}"/>
> >     </target>
> >
> > Output
> > ------
> >     C:\Projects\jakarta\turbine\build>build-turbine.bat env
> >     Buildfile: build-turbine.xml
> >
> >     check_for_optional_packages:
> >
> >     env:
> >     jsdk2.2 = ${jsdk2.2.present}
> >
> >     BUILD SUCCESSFUL
> >
> >     Total time: 1 second
> >
> >
> > Perhaps I'm misunderstanding the usage of the value attribute
> > in the available
> > tag, but in this scenario I'd expect to see:
> >     jsdk2.2 = false
> >
> > Am I missing something?
> >
> > --
> > Christopher Elkins
> >
> >
>
>


Mime
View raw message