Posted By:
Mert_Nuhoglu
Posted On:
Thursday, April 22, 2004 07:35 AM
There is a specific task to set environment variables from inside the ant.
Under the CoreTasks/exec. You should use "env" nested element.
There is a sample from ant documentation:
Actually I tried myself to set environment variable with this element. But I couldn't. I am not sure why it didn't.
Once I tried this:
I guess the error with this code was that more than one nested element is not allowed under exec.
Then I tried this:
It didn't work neither. In the Ant documentation, it states that the parameter line is not very predictable. But I need to use this, because I want to give more than one command. The other option value permits only one line of command.
Does anybody know how to do this in the correct way?