ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <stev...@iseran.com>
Subject Ant on java 1.4
Date Wed, 15 May 2002 17:42:00 GMT

Sam's attempt to get everything to build on ant 1.4 is halted not directly
by ant or xerces, but by junit:

http://nagoya.apache.org/~rubys/gump/java14/

However, the trace log shows that it is sort of our fault:

Buildfile: build.xml

init:

versiontag:
     [copy] Copying 1 file to /tmp/gump/junit/junit/runner
     [move] Moving 1 files to /tmp/gump/junit/junit/runner

build:
    [javac] Compiling 86 source files to /tmp/gump/junit

BUILD FAILED
/tmp/gump/junit/build.xml:28: This version of java does not support the
classic compiler

Total time: 3 seconds

--------

The junit build file must be setting build.compiler=classic, which we are
correctly recognising as wrong, and halting.

Should we try and go the other way, recognise when there is no classic
compiler and request 'modern'?

IMO it would be consistent with the fact that CompilerAdapterFactory goes
the other way.


..changes would be minor; replace throwing an exception message with a
warning and a fall through:
            if (compilerType.equalsIgnoreCase("classic") ||
                compilerType.equalsIgnoreCase("javac1.1") ||
                compilerType.equalsIgnoreCase("javac1.2")) {
                if (isClassicCompilerSupported) {
                    return new Javac12();
                } else {
                    task.log("This version of java does "
                                             + "not support the classic "
                                             + "compiler",
Project.MSG_WARN);
                    compilerType="modern";
                }
            }

Thoughts?


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message