ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cost...@covalent.net
Subject Re: Ant on java 1.4
Date Wed, 15 May 2002 21:25:25 GMT
I run gump on 1.4 by explicitely setting the compiler to modern.
( there are several other projects that set it to 'classic', junit
is just high on the deps list of gump ).

The bigger problem is that JDK1.4 requires a special flag to generate
code that will run on JDK1.1 ( it generates a class format that is not 
accepted ). On the other side, several jakarta packages require JDK1.4 
compilation ( since conditional compilation will exclude the JDK1.4 
stuff).

In particular the various impl. of jdbc.Connection ( including 
commons-pools ) can work on JDK1.4 only if compiled for JDK1.4. 

At this moment it is impossible to create a package that used 
connection pools and works on 1.1 to 1.4 ( or I don't know
any mechanism ).

I'll try to commit a fix and set flag to generate 1.1 code
and use modern if 1.4 is detected, but I don't have any time now.

Costin  


On Wed, 15 May 2002, Steve Loughran wrote:

> 
> 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>
> 
> 


--
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