On 12/3/06, Ravi Roy <[EMAIL PROTECTED]> wrote:
Thanks to all of you for your responses.
I tried to use first test case to solve 'uppercase/lowercase' issues as
suggested by Peter by using :
<property environment="env" upcase="yes"/>
The upcase attribute is just a suggestion.
but got the exception that -- <property type does not support upcase
attribute. I am
using Ant 1.6.5.
Trying other alternatives.....
In your original question you had:
<exec ...>
<env key="PATH" path="${env.PATH} />
There is no need to set the PATH for the exec if you are
not changing the PATH from that that started the ant.
So just remove the <env key="... line.
If java.exe is not in your path, or if you way to use the java
that is used by ant (this would be in ${env.JAVA_HOME}/bin or
${java.home}/../jdk/bin
use the <java/> task instead of the <exec/> task.
Peter
Regards
Ravi.
-----Original Message-----
From: Dominique Devienne [mailto:[EMAIL PROTECTED]
Sent: Sunday, December 03, 2006 4:44 AM
To: Ant Users List
Subject: Re: How to refer PATH environment variable in <exec> Ant task
On 12/2/06, Peter Reilly <[EMAIL PROTECTED]> wrote:
> Perhaps we could add an attribute to property
> to force the env names to be uppercasized:
> <property environment="env" upcase="yes"/>
>
> so <echo>${env.PATH}</echo>
> will always give the correct value
This solves only one half of the problem however.
One still needs to specify the path in <exec> using
the correct case for the var name on Windows.
We could I guess create properties with the names
of the environment vars (using the env.NAME'sname
convention, so one would do ${env.PATH's name} to
get the actual name of the upper-cased PATH env. var),
but that's a clunky, no?
Maybe we need explicit <path> and <libpath> elements
in <exec> to deal with such issues. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]