You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Christophe Demarey <Ch...@lifl.fr> on 2004/03/11 18:57:16 UTC
Use of environment properties
Hi,
I want to set an environment property in my own ant task.
I don't know the way to do this.
Can someone help me?
It tried this :
org.apache.tools.ant.taskdefs.Property prop_task = null;
org.apache.tools.ant.taskdefs.Property env_task = null;
env_task = new org.apache.tools.ant.taskdefs.Property();
env_task.setProject(getProject());
env_task.setEnvironment("env");
env_task.execute();
prop_task = new org.apache.tools.ant.taskdefs.Property();
prop_task.setProject(getProject());
prop_task.setEnvironment("env");
prop_task.setName("env.LD_LIBRARY_PATH");
prop_task.setValue("mypath");
prop_task.execute();
but without success.
Thanks,
Christophe.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Use of environment properties
Posted by Christophe Demarey <Ch...@lifl.fr>.
Hi,
I want to launch an application (not a java application) that needs an
environment property.
In my Ant task, I have the following line :
Runtime.getRuntime().exec( my_app );
my_app needs to access the environment variable LD_LIBRARY_PATH to find
libraries.
I need to set this variable in my ant task and don't know how to proceed.
Thanks for your help.
Christophe.
Matt Benson wrote:
>--- Christophe Demarey <Ch...@lifl.fr>
>wrote:
>
>
>>Hi,
>>
>>I want to set an environment property in my own ant
>>task.
>>
>>
>
>If you mean you want to permanently set this in the
>environment of the Ant process as a true environment
>variable, you can't. Let's back up; -why- do you want
>to do this? Then we'll know how to proceed.
>
>-Matt
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Search - Find what you’re looking for faster
>http://search.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Use of environment properties
Posted by Matt Benson <gu...@yahoo.com>.
--- Christophe Demarey <Ch...@lifl.fr>
wrote:
> Hi,
>
> I want to set an environment property in my own ant
> task.
If you mean you want to permanently set this in the
environment of the Ant process as a true environment
variable, you can't. Let's back up; -why- do you want
to do this? Then we'll know how to proceed.
-Matt
__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you�re looking for faster
http://search.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org