ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Jay's javac refactoring once again
Date Wed, 10 Jan 2001 08:51:59 GMT
Sam Ruby <rubys@us.ibm.com> wrote:

> Note that when build.sysclasspath is specified as either last or
> ignore, then the value of the addantruntime attribute is very
> relevant.

I think if build.sysclasspath has been set to anything but "ignore"
we'll have to determine who should win. Say it is "last" and
addantruntime has been set to "false" should we add the sysclasspath
to the end or not? I'd say yes, so build.sysclasspath should always
win.

> I will say that as the use case which lead up to the need for the
> addantruntime attribute argues for a default value of
> build.sysclasspath being either last or ignore, then I no longer see
> sufficient justification for the break in backwards compatibility
> and the default should be changed back to ignore.

The problem is that different task used different defaults. If we want
to remain compatible with the old <javac> it has to be "first" while
the old <java> requires "ignore".

So the modified javac task would invoke it like this

} else { // classpath != null
    if (addAntRuntime) {
        classpath.addExisting(compileClasspath.concatSystemClasspath("first"));
    } else {
        classpath.addExisting(compileClasspath.concatSystemClasspath("ignore"));
    }
}

The invocation in CommandlineJava should be changed to use "ignore" as
well.

How about adding a parameter to concatSystemClasspath that specifies
the default value to use? I agree with changing the name of the
method, that there should be a single location to change and that
it should be used from several places.

I'd suggest addSystemClasspath or even maybeAddSystemClasspath for the
name.

Stefan

Mime
View raw message