diff --git a/docs/manual/CoreTasks/javac.html b/docs/manual/CoreTasks/javac.html index 192643d7d..7e70e7e9f 100644 --- a/docs/manual/CoreTasks/javac.html +++ b/docs/manual/CoreTasks/javac.html @@ -52,9 +52,10 @@ attribute are:

  • classic (the standard compiler of JDK 1.1/1.2) – javac1.1 and javac1.2 can be used as aliases.
  • -
  • modern (the standard compiler of JDK 1.3/1.4) – +
  • modern (the standard compiler of JDK 1.3/1.4/1.5) – javac1.3 and - javac1.4 can be used as aliases.
  • + javac1.4 and + javac1.5 can be used as aliases.
  • jikes (the Jikes compiler).
  • @@ -235,7 +236,7 @@ invoking the compiler.

    Generate class files for specific VM version (e.g., 1.1 or 1.2). Note that the default value depends on the JVM that is running Ant. In - particular, if you use JDK 1.4 the generated classes will not be + particular, if you use JDK 1.4+ the generated classes will not be usable for a 1.1 Java VM unless you explicitly set this attribute to the value 1.1 (which is the default value for JDK 1.1 to 1.3). @@ -310,12 +311,12 @@ invoking the compiler.

    source Value of the -source command-line - switch; will be ignored by all implementations except + switch; will be ignored by all implementations prior to javac1.4 (or modern when Ant is not running in a 1.3 VM) 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 + switch.
    Legal values are 1.3, 1.4 and 1.5 – by default, no -source argument will be used at all. @@ -594,7 +595,7 @@ while all others are false.

    <javac>.


    -

    Copyright © 2000-2003 Apache Software Foundation. +

    Copyright © 2000-2004 Apache Software Foundation. All rights Reserved.

    diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java index 75624aa24..1abea362b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2003 The Apache Software Foundation. All rights + * Copyright (c) 2000-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -155,6 +155,8 @@ public class Javac extends MatchingTask { facade = new FacadeTaskHelper("javac1.3"); } else if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4)) { facade = new FacadeTaskHelper("javac1.4"); + } else if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_5)) { + facade = new FacadeTaskHelper("javac1.5"); } else { facade = new FacadeTaskHelper("classic"); } @@ -198,7 +200,7 @@ public class Javac extends MatchingTask { * * 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 + * Legal values are 1.3, 1.4 and 1.5 - by default, no -source argument * will be used at all. * * @param v Value to assign to source. @@ -845,7 +847,7 @@ public class Javac extends MatchingTask { * * @param compilerImpl the name of the compiler implementation * @return true if compilerImpl is "modern", "classic", "javac1.1", - * "javac1.2", "javac1.3" or "javac1.4". + * "javac1.2", "javac1.3", "javac1.4" or "javac1.5". */ protected boolean isJdkCompiler(String compilerImpl) { return "modern".equals(compilerImpl) @@ -853,7 +855,8 @@ public class Javac extends MatchingTask { || "javac1.1".equals(compilerImpl) || "javac1.2".equals(compilerImpl) || "javac1.3".equals(compilerImpl) - || "javac1.4".equals(compilerImpl); + || "javac1.4".equals(compilerImpl) + || "javac1.5".equals(compilerImpl); } /** diff --git a/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java b/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java index 63fd2d683..13e67ddb9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java +++ b/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001-2003 The Apache Software Foundation. All rights + * Copyright (c) 2001-2004 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -80,7 +80,7 @@ public class CompilerAdapterFactory { *