ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Glick <>
Subject Re: [PATCH] make Execute take advantage of 1.3's CWD support
Date Wed, 09 Aug 2000 13:47:19 GMT
Stefan Bodewig wrote:
>  JG> It should also correct a bug in ExecTask that antRun was used
>  JG> even when no 'dir' attribute was given (the working directory did
>  JG> not need to be set at all).
> Here I disagree.
> Whenever we specify a file or directory, we assume them to be relative
> to the project's basedir. Following this line of thought I interpret a
> missing dir attribute as "use the basedir" - which may very well be
> something other than user.dir. If it happens to be the same, we don't
> change the directory anyway.

Yes, that is sort of what I meant to say. The behavior in my patch is (I
hope) that it resolves the supplied working directory (if any) relative
to the project as usual, and if the result is the same as the current VM
cwd, then it skips trying to change the path (because it is already

However, if the "dir" attribute is simply omitted, then it does not make
any attempt to change the working directory with the understanding that
you don't care--if you need the command to be run in any particular
directory, you should pass e.g. dir=".". I presume you intend that a
missing dir should instead equal dir="." and that this is why you did
not commit the change to ExecTask.

> Actually you have to blame me, not Mariusz. I'm not sure, that
> user.dir holds an absolute path on every JDK. I hope it does - as I've
> commited you patch.

I hope so too...if it does *not* hold an absolute path, then it would be
pretty tautological.


Jesse Glick   <>
NetBeans, Open APIs  <>
tel (+4202) 3300-9161 Sun Micro x49161 Praha CR

View raw message