diff --git a/WHATSNEW b/WHATSNEW index c69217ec3..6c61419d7 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -232,6 +232,8 @@ Other changes: to the standard Java 1.4 doclet. The element is ignored when not running on Java 1.4. +* 's source attribute is now enabled for jikes as well. + Changes from Ant 1.4 to Ant 1.4.1 =========================================== diff --git a/docs/manual/CoreTasks/javac.html b/docs/manual/CoreTasks/javac.html index d49fe6c3f..55f54d5e0 100644 --- a/docs/manual/CoreTasks/javac.html +++ b/docs/manual/CoreTasks/javac.html @@ -284,11 +284,17 @@ invoking the compiler.

source + Value of the -source command-line switch; will be ignored by all implementations except - modern. Legal values are 1.3 and - 1.4 – by default, no -source argument - will be used at all. + modern and jikes.
+ If you use this attribute together with jikes, you + must make sure that your version of jikes supports the + -source switch.
+ Legal values are 1.3 and 1.4 – by + default, no -source argument will be used at + all. + No diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java b/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java index 28a16d3a9..e8d1df1c3 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/Jikes.java @@ -209,6 +209,11 @@ public class Jikes extends DefaultCompilerAdapter { cmd.createArgument().setValue("+F"); } + if (attributes.getSource() != null) { + cmd.createArgument().setValue("-source"); + cmd.createArgument().setValue(attributes.getSource()); + } + addCurrentCompilerArgs(cmd); int firstFileName = cmd.size();