Ant ignores attempt to override the LANG environment variable
- by Steen
We need to test a java build with the languages set to different values. I can manually (i.e. via export LANG=en_DK.UTF-8 and export LANG=en_DK) test that the unit tests run with the ant build script behaves differently, but I need to set the environment variable from ant. I have tried setting it using these methods (with the shell $LANG set to en_DK.UTF-8):
using -D on the command line: ant -DLANG=en_DK
using a build.properties file with the line LANG=en_DK in it
using the following statements in the build.xml file (sorry for the formatting, I can't get SO to display it otherwise):
:
<property environment="ANTENV"/>
<property name="ANTENV.LANG" value="en_DK"/>
Using any of the three possibilities, and when run with -debug, ant reports that:
Override ignored for property "LANG"
What can I do to set the LANG environment variable from within ant?