Running Ant 1.8.1 on SUSE Linux Enterprise Server results in sporadically not recognizing <property environment="sysenv."/>; as this (unedited sequence illustrates): anthill@zlinuxs1:~/JDE015/EJBServer> ant -f test.xml Buildfile: /home/anthill/JDE015/EJBServer/test.xml test: [echo] ${sysenv.SERVER_DIR} BUILD SUCCESSFUL Total time: 23 seconds anthill@zlinuxs1:~/JDE015/EJBServer> ant -f test.xml Buildfile: /home/anthill/JDE015/EJBServer/test.xml test: [echo] /home/anthill/JDE015/EJBServer BUILD SUCCESSFUL Total time: 20 seconds anthill@zlinuxs1:~/JDE015/EJBServer> cat test.xml <?xml version="1.0" encoding="UTF-8"?> <project name="CuramServerBuild" default="test"> <property environment="sysenv."/> <target name="test"> <echo>${sysenv.SERVER_DIR}</echo> </target> </project> anthill@zlinuxs1:~/JDE015/EJBServer> ant -version Apache Ant version 1.8.1 compiled on April 30 2010 anthill@zlinuxs1:~/JDE015/EJBServer> echo $SERVER_DIR /home/anthill/JDE015/EJBServer My searches indicate issues around <property environment> failing due to memory issues, but in searching -v output of my failures I have not seen any errors. But, could this be resource-related, failing silently? This is the environment (SLES 10 SP2), no other platforms at our site have reported this: uname -a Linux zlinuxs1 2.6.16.60-0.21-default #1 SMP Tue May 6 12:41:02 UTC 2008 s390x s390x s390x GNU/Linux Thanks, William
Could you do us a favor and try what I described in http://mail-archives.apache.org/mod_mbox/ant-user/201006.mbox/%3C8739wws7fa.fsf@v35516.1blu.de%3E Ant's trunk has switched to use System.getenv which may solve your issue, OTOH it may introduce other differences on your OS that we are not yet aware of.
I updated 49336 with the results of the test - no differences. Thanks, www
Thank you for testing. This should mean Ant's trunk will work reliably on your OS.