On Tue, 2 Apr 2002, Diane Holt <[EMAIL PROTECTED]> wrote:

> Hmm... I tested the snot out of it, so I'm surprised to hear that.

To be honest, I didn't actually test it, just ran the code in my head.
If dir is null, you'll get a NullPointerException - I didn't see that
it is extremely unlikely that dir is null, but it is possible.

See the code in execute that immediately preceedes the call to
initializeProject, it will leave dir as null if inheritAll is false
and dir hasn't been specified (to not override the basedir of the new
project).

> I ran it (with my changes) without specifying a dir, and it worked
> fine.

set inheritall to false - I think I'll simply add a JUnit testcase
that demonstrates the failure and fix it after that.

Run this:

<project name="foo" default="bar">
  <target name="foo">
    <echo message="baz"/>
  </target>

  <target name="bar">
    <ant inheritall="false" output="zyzzy.log" target="foo"
         antfile="foo.xml"/>
  </target>
</project>

>> As I'm not sure what you want to do in the presence of a dir
>> attribute, therefore I'm not patching the task right now.
> 
> The previous behaviour was that the output file would be created in
> the current directory rather than in the directory of the build file
> being called (if different from the current directory).

Yes.

But the question remains, where do we want to put the logfile if the
user has specified a dir attribute.  Into dir or still use the current
projects basedir?  We are talking about a backwards incompatible
change anyway, but one that can be called a bugfix for very good
reasons 8-).

Stefan

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to