You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ray Tayek <rt...@attbi.com> on 2003/05/17 23:16:47 UTC

problem with condition using boolean

the following blows off with a: Element type "isUnix" must be followed by 
either attribute specifications, ">" or "/>". happens if i use 
isUnix="true" or just isUnix by itself. blows in unix or windoze 98se using 
ant 5.1.

how does one use a property that is set to true in a <condition 
property=...> statement?

thanks

<project basedir="." default="all" name="ImageViewer">
         <target name="init">
                 <condition property="isUnix"> <os family="unix"/> </condition>
                 <echo message="isUnix=${isUnix}"/>
                 <condition property="junitPath" value="../junit3.7"> 
<isUnix=true/> </condition>

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/


Re: problem with condition using boolean

Posted by Ray Tayek <rt...@attbi.com>.
At 10:16 PM 5/18/03 +0200, you wrote:
>What I think you need is :
><condition property="junitPath" value="../junit3.7">
><istrue value="${isUnix}"/>
>  </condition>
>if your intention is to set the property junitPath with valu ../junit3.7 if
>the isUnix property has been set to "true"
>Source : http://ant.apache.org/manual/CoreTasks/conditions.html
>Cheers
>Antoine

yes, works like a charm!

thanks


>----- Original Message -----
>From: "Ray Tayek" <rt...@attbi.com>
>To: <us...@ant.apache.org>
>Sent: Saturday, May 17, 2003 11:16 PM
>Subject: problem with condition using boolean
>
>
> > the following blows off with a: Element type "isUnix" must be followed by
> > either attribute specifications, ">" or "/>". happens if i use
> > isUnix="true" or just isUnix by itself. blows in unix or windoze 98se
>using
> > ant 5.1.
> >
> > how does one use a property that is set to true in a <condition
> > property=...> statement?
> >
> > thanks
> >
> > <project basedir="." default="all" name="ImageViewer">
> >          <target name="init">
> >                  <condition property="isUnix"> <os family="unix"/>
></condition>
> >                  <echo message="isUnix=${isUnix}"/>
> >                  <condition property="junitPath" value="../junit3.7">
> > <isUnix=true/> </condition>...

---
ray tayek http://tayek.com/ actively seeking mentoring or telecommuting work
vice chair orange county java users group http://www.ocjug.org/
hate spam? http://samspade.org/ssw/


Re: problem with condition using boolean

Posted by Antoine Levy-Lambert <le...@tiscali-dsl.de>.
What I think you need is :
<condition property="junitPath" value="../junit3.7">
<istrue value="${isUnix}"/>
 </condition>
if your intention is to set the property junitPath with valu ../junit3.7 if
the isUnix property has been set to "true"
Source : http://ant.apache.org/manual/CoreTasks/conditions.html
Cheers
Antoine

----- Original Message -----
From: "Ray Tayek" <rt...@attbi.com>
To: <us...@ant.apache.org>
Sent: Saturday, May 17, 2003 11:16 PM
Subject: problem with condition using boolean


> the following blows off with a: Element type "isUnix" must be followed by
> either attribute specifications, ">" or "/>". happens if i use
> isUnix="true" or just isUnix by itself. blows in unix or windoze 98se
using
> ant 5.1.
>
> how does one use a property that is set to true in a <condition
> property=...> statement?
>
> thanks
>
> <project basedir="." default="all" name="ImageViewer">
>          <target name="init">
>                  <condition property="isUnix"> <os family="unix"/>
</condition>
>                  <echo message="isUnix=${isUnix}"/>
>                  <condition property="junitPath" value="../junit3.7">
> <isUnix=true/> </condition>
>
> ---
> ray tayek http://tayek.com/ actively seeking mentoring or telecommuting
work
> vice chair orange county java users group http://www.ocjug.org/
> hate spam? http://samspade.org/ssw/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>