Community
Participate
Working Groups
I'm running an external version of Ant (1.5) from my "E:\ant" directory. Eclipse is set to use this exernal version, and the config Preferences/Ant/Runtime have been configured to set ANT_HOME to "E:\ant" (the checkbox is ticked). Ant sets/expects the "ant.home" property to be set to Ant's location. Using this test build file: <?xml version="1.0"?> <project name="ant_home" default="ant_home_test" basedir="."> <target name="ant_home_test"> <echo message="ant.home=${ant.home}"/> </target> </project> The first build using Ant fails to set the ant.home property correctly, producing the following output: Buildfile: E:\eclipse\workspace\HelloEJB\ant_home_test.xml ant_home_test: [echo] ant.home=${ant.home} BUILD SUCCESSFUL The second and following builds do set the ant.home property correctly, producting the expected output: Buildfile: E:\eclipse\workspace\HelloEJB\ant_home_test.xml ant_home_test: [echo] ant.home=E:\ant BUILD SUCCESSFUL Workaround: discard the first Ant build. Eclipse 2.1 M4 on Windows 2000. Apologies if I've missed anything important, this is my first bug submission to Bugzilla.
Created attachment 2867 [details] Test case build file to demonstrate the bug
A few bugs here: not setting the system property early enough not clearing the system property if the user had unset ant_home launch specific settings were not honored. Fixed in AntCorePreferences and InternalAntRunner, AntRunner and AntUtil. Please verify (Jared).
I was about to report some additional information to help in the bug hunt. I moved my external Ant installation to another dir, and found the old E:\ant appearing instead of the null-like value of ${ant.home}, suggesting a history problem. Sounds like you caught it, many thanks.
Verified.