bodewig     2004/01/28 02:33:24

  Modified:    .        Tag: ANT_16_BRANCH WHATSNEW
               docs/manual/CoreTasks Tag: ANT_16_BRANCH javac.html
               src/main/org/apache/tools/ant/taskdefs Tag: ANT_16_BRANCH
                        Javac.java
               src/main/org/apache/tools/ant/taskdefs/compilers Tag:
                        ANT_16_BRANCH CompilerAdapterFactory.java
                        DefaultCompilerAdapter.java
               src/main/org/apache/tools/ant/util Tag: ANT_16_BRANCH
                        JavaEnvUtils.java
  Log:
  Merge initial Java 1.5 support from HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.503.2.30 +5 -1      ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.503.2.29
  retrieving revision 1.503.2.30
  diff -u -r1.503.2.29 -r1.503.2.30
  --- WHATSNEW  22 Jan 2004 18:47:57 -0000      1.503.2.29
  +++ WHATSNEW  28 Jan 2004 10:33:04 -0000      1.503.2.30
  @@ -42,7 +42,11 @@
   * add description attributes to macrodef attributes and elements.
     Bugzilla Report 24711.
   
  -* add textname attribute to macrodef.
  +* added nested text support to <macrodef>
  +  
  +* added initial support for Java 1.5.  Java 1.5 is now correctly
  +  detected by Ant and treated just like Java 1.4.  You can now specify
  +  source="1.5" in the <javac> task.
   
   Changes from Ant 1.6.B3 to Ant 1.6.0
   ====================================
  
  
  
  No                   revision
  No                   revision
  1.42.2.2  +7 -6      ant/docs/manual/CoreTasks/javac.html
  
  Index: javac.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/CoreTasks/javac.html,v
  retrieving revision 1.42.2.1
  retrieving revision 1.42.2.2
  diff -u -r1.42.2.1 -r1.42.2.2
  --- javac.html        9 Oct 2003 21:01:07 -0000       1.42.2.1
  +++ javac.html        28 Jan 2004 10:33:09 -0000      1.42.2.2
  @@ -53,9 +53,10 @@
     <li><code>classic</code> (the standard compiler of JDK 1.1/1.2) &ndash;
         <code>javac1.1</code> and
         <code>javac1.2</code> can be used as aliases.</li>
  -  <li><code>modern</code> (the standard compiler of JDK 1.3/1.4) &ndash;
  +  <li><code>modern</code> (the standard compiler of JDK 1.3/1.4/1.5) &ndash;
         <code>javac1.3</code> and
  -      <code>javac1.4</code> can be used as aliases.</li>
  +      <code>javac1.4</code> and
  +      <code>javac1.5</code> can be used as aliases.</li>
     <li><code>jikes</code> (the <a
       href="http://oss.software.ibm.com/developerworks/opensource/jikes/"; 
target="_top">Jikes</a>
       compiler).</li>
  @@ -236,7 +237,7 @@
       <td valign="top">Generate class files for specific VM version
       (e.g., <code>1.1</code> or <code>1.2</code>). <b>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).</b></td>
  @@ -311,12 +312,12 @@
       <td valign="top">source</td>
   
       <td valign="top">Value of the <code>-source</code> command-line
  -    switch; will be ignored by all implementations except
  +    switch; will be ignored by all implementations prior to
       <code>javac1.4</code> (or <code>modern</code> when Ant is not
       running in a 1.3 VM) and <code>jikes</code>.<br> If you use this
       attribute together with <code>jikes</code>, you must make sure
       that your version of jikes supports the <code>-source</code>
  -    switch.<br> Legal values are <code>1.3</code> and <code>1.4</code>
  +    switch.<br> Legal values are <code>1.3</code>, <code>1.4</code> and 
<code>1.5</code>
       &ndash; by default, no <code>-source</code> argument will be used
       at all.</td>
   
  @@ -595,7 +596,7 @@
   <code>&lt;javac&gt;</code>.</p>
   
   <hr>
  -<p align="center">Copyright &copy; 2000-2003 Apache Software Foundation.
  +<p align="center">Copyright &copy; 2000-2004 Apache Software Foundation.
   All rights Reserved.</p>
   
   </body>
  
  
  
  No                   revision
  No                   revision
  1.115.2.1 +8 -5      ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.115
  retrieving revision 1.115.2.1
  diff -u -r1.115 -r1.115.2.1
  --- Javac.java        16 Sep 2003 09:08:55 -0000      1.115
  +++ Javac.java        28 Jan 2004 10:33:13 -0000      1.115.2.1
  @@ -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 @@
               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 @@
        *
        * 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 @@
        *
        * @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 @@
               || "javac1.1".equals(compilerImpl)
               || "javac1.2".equals(compilerImpl)
               || "javac1.3".equals(compilerImpl)
  -            || "javac1.4".equals(compilerImpl);
  +            || "javac1.4".equals(compilerImpl)
  +            || "javac1.5".equals(compilerImpl);
       }
   
       /**
  
  
  
  No                   revision
  No                   revision
  1.21.2.1  +7 -4      
ant/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java
  
  Index: CompilerAdapterFactory.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/compilers/CompilerAdapterFactory.java,v
  retrieving revision 1.21
  retrieving revision 1.21.2.1
  diff -u -r1.21 -r1.21.2.1
  --- CompilerAdapterFactory.java       16 Sep 2003 09:08:57 -0000      1.21
  +++ CompilerAdapterFactory.java       28 Jan 2004 10:33:18 -0000      1.21.2.1
  @@ -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 @@
        * <ul><li>jikes = jikes compiler
        * <li>classic, javac1.1, javac1.2 = the standard compiler from JDK
        * 1.1/1.2
  -     * <li>modern, javac1.3, javac1.4 = the compiler of JDK 1.3+
  +     * <li>modern, javac1.3, javac1.4, javac1.5 = the compiler of JDK 1.3+
        * <li>jvc, microsoft = the command line compiler from Microsoft's SDK
        * for Java / Visual J++
        * <li>kjc = the kopi compiler</li>
  @@ -100,7 +100,9 @@
           throws BuildException {
               boolean isClassicCompilerSupported = true;
               //as new versions of java come out, add them to this test
  -            if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_4)) {
  +            if (!JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)
  +                && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_2)
  +                && !JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_3)) {
                   isClassicCompilerSupported = false;
               }
   
  @@ -127,7 +129,8 @@
               //but on java>=1.4 we just bail out early
               if (compilerType.equalsIgnoreCase("modern")
                   || compilerType.equalsIgnoreCase("javac1.3")
  -                || compilerType.equalsIgnoreCase("javac1.4")) {
  +                || compilerType.equalsIgnoreCase("javac1.4")
  +                || compilerType.equalsIgnoreCase("javac1.5")) {
                   // does the modern compiler exist?
                   if (doesModernCompilerExist()) {
                       return new Javac13();
  
  
  
  1.41.2.2  +1 -1      
ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.41.2.1
  retrieving revision 1.41.2.2
  diff -u -r1.41.2.1 -r1.41.2.2
  --- DefaultCompilerAdapter.java       14 Oct 2003 13:20:12 -0000      1.41.2.1
  +++ DefaultCompilerAdapter.java       28 Jan 2004 10:33:18 -0000      1.41.2.2
  @@ -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
  
  
  
  No                   revision
  No                   revision
  1.15.2.1  +9 -1      ant/src/main/org/apache/tools/ant/util/JavaEnvUtils.java
  
  Index: JavaEnvUtils.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/util/JavaEnvUtils.java,v
  retrieving revision 1.15
  retrieving revision 1.15.2.1
  diff -u -r1.15 -r1.15.2.1
  --- JavaEnvUtils.java 19 Jul 2003 08:11:08 -0000      1.15
  +++ JavaEnvUtils.java 28 Jan 2004 10:33:23 -0000      1.15.2.1
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2002-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2002-2004 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -96,6 +96,8 @@
       public static final String JAVA_1_3 = "1.3";
       /** Version constant for Java 1.4 */
       public static final String JAVA_1_4 = "1.4";
  +    /** Version constant for Java 1.5 */
  +    public static final String JAVA_1_5 = "1.5";
   
       /** array of packages in the runtime */
       private static Vector jrePackages;
  @@ -104,6 +106,7 @@
       static {
   
           // Determine the Java version by looking at available classes
  +        // java.lang.Readable was introduced in JDK 1.5
           // java.lang.CharSequence was introduced in JDK 1.4
           // java.lang.StrictMath was introduced in JDK 1.3
           // java.lang.ThreadLocal was introduced in JDK 1.2
  @@ -125,6 +128,9 @@
               Class.forName("java.lang.CharSequence");
               javaVersion = JAVA_1_4;
               javaVersionNumber++;
  +            Class.forName("java.lang.Readable");
  +            javaVersion = JAVA_1_5;
  +            javaVersionNumber++;
           } catch (Throwable t) {
               // swallow as we've hit the max class version that
               // we have
  @@ -275,6 +281,7 @@
       private static void buildJrePackages() {
           jrePackages = new Vector();
           switch(javaVersionNumber) {
  +            case 15:
               case 14:
                   jrePackages.addElement("org.apache.crimson");
                   jrePackages.addElement("org.apache.xalan");
  @@ -317,6 +324,7 @@
           Vector tests = new Vector();
           tests.addElement("java.lang.Object");
           switch(javaVersionNumber) {
  +            case 15:
               case 14:
                   tests.addElement("sun.audio.AudioPlayer");
                   tests.addElement("org.apache.crimson.parser.ContentModel");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to