ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin" <mgai...@hotmail.com>
Subject Re: Using available's property setting ability inside a condition, isit possible?
Date Thu, 11 Apr 2002 13:57:35 GMT
On a related note
How does one extend the classpath in java task
I set classpath as such
<java classpath="./lib/newjar.jar;${classpath}" ....
but I find this classpath specification does not work
I find that adding a property into global classpath works
Am I implementing classpath in java correctly?
Thank You,
Martin
----- Original Message -----
From: "Kendall Collett" <kcollett@convio.com>
To: "Ant Users List" <ant-user@jakarta.apache.org>
Sent: Saturday, November 09, 2002 6:58 PM
Subject: Re: Using available's property setting ability inside a condition,
isit possible?


> In the documentation for the nested elements of <condition> (see
> <http://jakarta.apache.org/ant/manual/CoreTasks/conditions.html>), it
says:
>     available
>     This condition is identical to the Available task, all attributes and
> nested elements of that task are supported, *the property and value
> attributes are redundant and will be ignored*.
>
> Kendall
>
> ----- Original Message -----
> From: "David Budworth" <dlbant@nustiu.net>
> To: "ANT User List" <ant-user@jakarta.apache.org>
> Sent: Saturday, November 09, 2002 16:43
> Subject: Using available's property setting ability inside a condition,
isit
> possible?
>
>
> > Hi All,
> >
> > I'm finding that the following doesn't work:
> > <target name="find.compiler">
> >   <condition property="compiler.found">
> >     <or>
> >       <available file="jikes" filepath="${env.PATH}"
> >          property="compiler.type" value="jikes"/>
> >       <available file="javac" filepath="${env.PATH}"
> >          property="compiler.type" value="javac"/>
> >     </or>
> >   </condition>
> >   <echo>Compiler found: ${compiler.found}, type: ${compiler.type}</echo>
> > </target>
> >
> > output:
> > [echo] Compiler found: true, type: ${compiler.type}
> >
> >
> > The compiler type never gets set.
> >
> > If I move the available directives outside the condition and comment out
> > the condition section I get:
> > [echo] Compiler found: ${compiler.found}, type: jikes
> >
> >
> > The ${compiler.found} part is expected in the second output since I
> > removed the condition.  But, as you can see, ${compiler.type} gets set
> > just fine.
> >
> > The only workaround for this I can find is to do it the old way, of
> > multiple targets with an "unless=compiler.type" tag on them.
> >
> > Is this a bug?  I found no mention in the docs for condition saying you
> > can't set properties inside it like that.
> >
> > Thank you
> > -David Budworth
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
> >
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>

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