ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 45739] Problems with BaseDir when the ant is started as Java library from Java Application
Date Fri, 05 Sep 2008 08:04:06 GMT

--- Comment #6 from Stefan Bodewig <>  2008-09-05 01:04:05 PST ---
I'm not suggesting you should invoke project.getBasedir earlier (prior to
project.init), quite the opposite.

Something is calling getBasedir on your project instance before it is safe to
do so, i.e. before the XML file has been parsed which doesn't happen before
ProjectHelper.configureProject in runBuild.

Yes, user.dir may be read in some places but neither is directly related to
setting the basedir.

On a related note, changing the current working directory within a Java process
is almost impossible to do 8and impossible to do in a portable way).  If you
change user.dir it probably doesn't have the desired effect on tasks like
<exec>.  Just take a look at the many silly things the Execute class does
to be able to invoke an executable inside a different working directory than
the one of the current process - simple as long as you can stick with a
JVM on a specific OS.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message