I am running Ant to exec another process. This other process has problems with some environment variables that are present. I want these environment variables to be undefined when I exec the other process.
Of course I can undefine the environment variable prior to running Ant. However I am interested in undefining the variable within Ant prior to execing the other process.
So I have at the time of calling Ant an environment with:
SOME_VAR=a-value
And I have in my build.xml:
..<exec exacutable="program.exe>...
And my program.exe chokes on the fact that SOME_VAR is defined.
The exec task has a
newenvironmentattribute which when set totrueclears the current environment. Use together with nestedenvelements.