From 808b91716adaa8e38b4ab9adbd8fafa1d85381a2 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Thu, 21 Mar 2002 09:17:01 +0000 Subject: [PATCH] enable 's source attribute for jikes as well. PR: 7002 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271934 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 2 ++ docs/manual/CoreTasks/javac.html | 12 +++++++++--- .../apache/tools/ant/taskdefs/compilers/Jikes.java | 5 +++++ 3 files changed, 16 insertions(+), 3 deletions(-) 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();