You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/10/19 21:41:15 UTC
DO NOT REPLY [Bug 31787] New: -
Cocoon fails to build with Java 5
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31787>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=31787
Cocoon fails to build with Java 5
Summary: Cocoon fails to build with Java 5
Product: Cocoon 2
Version: 2.1.5
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: core
AssignedTo: dev@cocoon.apache.org
ReportedBy: wasti.redl@gmx.net
As the Wiki FAQ shows, at least one other user had this problem and couldn't
resolve it, so reverted to a 1.4 JDK.
When trying to build Cocoon 2.1 via the build.sh/build.bat, it fails, due to the
javac error message:
javac: source release 1.4 requires target release 1.4
This is because the -source switch for a 1.5 javac defaults to 1.4. The error
message is generated if you set -target to 1.3 and don't set source, or set it
to something higher (1.4 or 1.5).
The Cocoon build.xmls use target="1.3" in their javac tasks, without setting
source. Thus the compile fails.
I see three possible solutions:
1) Upgrade all target attributes to 1.4. This is actually inacceptable, because
a) it only delays the problem until Java 1.6 comes out and defaults to 1.5
source and b) it drops support for Java 1.3, which is probably not desired.
2) Add a source="1.3" in all javac tasks. This is a possible solution, but it
binds forever to Java 1.3.
3) Make the target attribute depend on the local Java version. There ought to be
no problem at all in writing target="${ant.javaversion]" or whatever property is
used for this.
I'll patch my own source tree and see if this solves the problem, then post back.