ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <>
Subject RE: Ant task and output attribute
Date Thu, 07 Mar 2002 09:06:57 GMT
> From: Jose Alberto Fernandez []
> From: "Conor MacNeill" <>
> > I have just written a facade for the Ant task in mutant and noticed
> > something odd in the Ant 1.x source. The output attribute for the Ant
> > task is specified as a String. As far as I can tell it is never
> resolved
> > to the project's base directory. Do you think this should be fixed by
> > changing the parameter to a File. Such a change would a minor backward
> > compatability break but could be considered a bug fix.
> >
> I think we should just add an additional method with the file signature
> and do the resolving in the method passing a String.
> That way we keep Backward compatibility and fix the bug, like we
> have done before.
>     public void setOutput(File out) { .... }
>     public void setOutput(String out) {
>         setOutput(resolveFile(out));
>     }

Jose Alberto,

What you have proposed is not backward compatible. That isn't to say this
should not be fixed. The above changes the behaviour of setOutput(String) to
resolve the file, which is what it does not do currently.

Also I don't know which way Introspection would choose to go. I have to look
at the code but I think Magesh added code so it would prefer the File
version over the String version. Therefore even at the build file level this
too would be incompatible. The only way to be backward compatible would be
to have

public void setResolvedOutput(File out).

Pretty ugly. I'd probably lean to saying current implementation is incorrect
and should be fixed, incurring a slight compatibility problem.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message