ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types CommandlineJava.java Path.java
Date Sun, 30 Dec 2001 01:14:59 GMT
donaldp     01/12/29 17:14:59

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant Project.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        GenerateKey.java Get.java Java.java Javac.java
                        SignJar.java Touch.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers
                        DefaultCompilerAdapter.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional
                        Javah.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata
                        AbstractMetamataTask.java MParse.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic
                        DefaultRmicAdapter.java
               proposal/myrmidon/src/main/org/apache/tools/ant/types
                        CommandlineJava.java Path.java
  Log:
  Removed Project.getVersion() replaced it with getJavaVersion() (inherited from AbstractTask)
where necessary and removed all checks for java 1.1
  
  Revision  Changes    Path
  1.16      +0 -32     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Project.java	30 Dec 2001 01:04:35 -0000	1.15
  +++ Project.java	30 Dec 2001 01:14:58 -0000	1.16
  @@ -115,16 +115,6 @@
       }
   
       /**
  -     * static query of the java version
  -     *
  -     * @return something like "1.1" or "1.3"
  -     */
  -    public static String getJavaVersion()
  -    {
  -        return javaVersion;
  -    }
  -
  -    /**
        * returns the boolean equivalent of a string, which is considered true if
        * either "on", "true", or "yes" is found, ignoring case.
        *
  @@ -136,28 +126,6 @@
           return ( s.equalsIgnoreCase( "on" ) ||
               s.equalsIgnoreCase( "true" ) ||
               s.equalsIgnoreCase( "yes" ) );
  -    }
  -
  -    /**
  -     * set the ant.java.version property, also tests for unsupported JVM
  -     * versions, prints the verbose log messages
  -     *
  -     * @throws TaskException if this Java version is not supported
  -     */
  -    public void setJavaVersionProperty()
  -        throws TaskException
  -    {
  -        setPropertyInternal( "ant.java.version", javaVersion );
  -
  -        // sanity check
  -        if( javaVersion == JAVA_1_0 )
  -        {
  -            throw new TaskException( "Ant cannot work on Java 1.0" );
  -        }
  -
  -        getLogger().debug( "Detected Java version: " + javaVersion + " in: " + System.getProperty(
"java.home" ) );
  -
  -        getLogger().debug( "Detected OS: " + System.getProperty( "os.name" ) );
       }
   
       /**
  
  
  
  1.14      +0 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java
  
  Index: GenerateKey.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/GenerateKey.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- GenerateKey.java	23 Dec 2001 06:33:35 -0000	1.13
  +++ GenerateKey.java	30 Dec 2001 01:14:58 -0000	1.14
  @@ -139,12 +139,6 @@
       public void execute()
           throws TaskException
       {
  -        if( getProject().getJavaVersion().equals( Project.JAVA_1_1 ) )
  -        {
  -            throw new TaskException( "The genkey task is only available on JDK" +
  -                                     " versions 1.2 or greater" );
  -        }
  -
           if( null == alias )
           {
               throw new TaskException( "alias attribute must be set" );
  
  
  
  1.11      +6 -18     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java
  
  Index: Get.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Get.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Get.java	23 Dec 2001 06:33:35 -0000	1.10
  +++ Get.java	30 Dec 2001 01:14:58 -0000	1.11
  @@ -16,7 +16,6 @@
   import java.net.URLConnection;
   import java.util.Date;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   
   /**
  @@ -95,10 +94,7 @@
        */
       public void setUseTimestamp( boolean v )
       {
  -        if( getProject().getJavaVersion() != Project.JAVA_1_1 )
  -        {
  -            useTimestamp = v;
  -        }
  +        useTimestamp = v;
       }
   
       /**
  @@ -296,22 +292,14 @@
        * @exception TaskException Thrown in unrecoverable error. Likely this
        *      comes from file access failures.
        */
  -    protected boolean touchFile( File file, long timemillis )
  +    protected void touchFile( File file, long timemillis )
           throws TaskException
       {
   
  -        if( getProject().getJavaVersion() != Project.JAVA_1_1 )
  -        {
  -            Touch touch = (Touch)getProject().createTask( "touch" );
  -            touch.setFile( file );
  -            touch.setMillis( timemillis );
  -            touch.touch();
  -            return true;
  -        }
  -        else
  -        {
  -            return false;
  -        }
  +        Touch touch = (Touch)getProject().createTask( "touch" );
  +        touch.setFile( file );
  +        touch.setMillis( timemillis );
  +        touch.touch();
       }
   
       /**
  
  
  
  1.17      +0 -5      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java
  
  Index: Java.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Java.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- Java.java	30 Dec 2001 00:13:31 -0000	1.16
  +++ Java.java	30 Dec 2001 01:14:58 -0000	1.17
  @@ -109,11 +109,6 @@
           this.fork = s;
       }
   
  -    public void setJVMVersion( String value )
  -    {
  -        cmdl.setVmversion( value );
  -    }
  -
       /**
        * set the jar name...
        *
  
  
  
  1.15      +2 -2      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- Javac.java	30 Dec 2001 00:21:51 -0000	1.14
  +++ Javac.java	30 Dec 2001 01:14:58 -0000	1.15
  @@ -11,6 +11,7 @@
   import java.util.ArrayList;
   import java.util.Iterator;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.JavaVersion;
   import org.apache.myrmidon.framework.Os;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.Project;
  @@ -894,8 +895,7 @@
   
           if( compiler == null )
           {
  -            if( Project.getJavaVersion() != Project.JAVA_1_1 &&
  -                Project.getJavaVersion() != Project.JAVA_1_2 )
  +            if( JavaVersion.JAVA1_2  != getJavaVersion() )
               {
                   compiler = "modern";
               }
  
  
  
  1.11      +0 -5      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SignJar.java
  
  Index: SignJar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/SignJar.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SignJar.java	23 Dec 2001 06:33:35 -0000	1.10
  +++ SignJar.java	30 Dec 2001 01:14:58 -0000	1.11
  @@ -249,11 +249,6 @@
       private void doOneJar( File jarSource, File jarTarget )
           throws TaskException
       {
  -        if( getProject().getJavaVersion().equals( Project.JAVA_1_1 ) )
  -        {
  -            throw new TaskException( "The signjar task is only available on JDK versions
1.2 or greater" );
  -        }
  -
           if( null == alias )
           {
               throw new TaskException( "alias attribute must be set" );
  
  
  
  1.11      +0 -11     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Touch.java
  
  Index: Touch.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/Touch.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Touch.java	23 Dec 2001 14:21:50 -0000	1.10
  +++ Touch.java	30 Dec 2001 01:14:58 -0000	1.11
  @@ -148,12 +148,6 @@
               }
           }
   
  -        if( millis >= 0 && getProject().getJavaVersion() == Project.JAVA_1_1
)
  -        {
  -            getLogger().warn( "modification time of files cannot be set in JDK 1.1" );
  -            return;
  -        }
  -
           boolean resetMillis = false;
           if( millis < 0 )
           {
  @@ -199,11 +193,6 @@
           if( !file.canWrite() )
           {
               throw new TaskException( "Can not change modification date of read-only file
" + file );
  -        }
  -
  -        if( getProject().getJavaVersion() == Project.JAVA_1_1 )
  -        {
  -            return;
           }
   
           final long time = ( millis < 0 ) ? System.currentTimeMillis() : millis;
  
  
  
  1.16      +22 -67    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java
  
  Index: DefaultCompilerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/compilers/DefaultCompilerAdapter.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- DefaultCompilerAdapter.java	30 Dec 2001 00:04:21 -0000	1.15
  +++ DefaultCompilerAdapter.java	30 Dec 2001 01:14:59 -0000	1.16
  @@ -13,6 +13,7 @@
   import java.io.PrintWriter;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.JavaVersion;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.Javac;
   import org.apache.tools.ant.taskdefs.exec.Execute;
  @@ -125,12 +126,7 @@
           throws TaskException
       {
           Path classpath = getCompileClasspath();
  -
  -        // we cannot be using Java 1.0 when forking, so we only have to
  -        // distinguish between Java 1.1, and Java 1.2 and higher, as Java 1.1
  -        // has its own parameter format
  -        boolean usingJava1_1 = Project.getJavaVersion().equals( Project.JAVA_1_1 );
  -        String memoryParameterPrefix = usingJava1_1 ? "-J-" : "-J-X";
  +        String memoryParameterPrefix = "-J-X";
           if( m_memoryInitialSize != null )
           {
               if( !m_attributes.isForkedJavac() )
  @@ -174,47 +170,27 @@
           }
   
           cmd.createArgument().setValue( "-classpath" );
  +        cmd.createArgument().setPath( classpath );
   
  -        // Just add "sourcepath" to classpath ( for JDK1.1 )
  -        // as well as "bootclasspath" and "extdirs"
  -        if( Project.getJavaVersion().startsWith( "1.1" ) )
  -        {
  -            Path cp = new Path();
  -            /*
  -             * XXX - This doesn't mix very well with build.systemclasspath,
  -             */
  -            if( m_bootclasspath != null )
  -            {
  -                cp.append( m_bootclasspath );
  -            }
  -            if( m_extdirs != null )
  -            {
  -                cp.addExtdirs( m_extdirs );
  -            }
  -            cp.append( classpath );
  -            cp.append( src );
  -            cmd.createArgument().setPath( cp );
  +        cmd.createArgument().setValue( "-sourcepath" );
  +        cmd.createArgument().setPath( src );
  +
  +        if( target != null )
  +        {
  +            cmd.createArgument().setValue( "-target" );
  +            cmd.createArgument().setValue( target );
           }
  -        else
  +
  +        if( m_bootclasspath != null )
           {
  -            cmd.createArgument().setPath( classpath );
  -            cmd.createArgument().setValue( "-sourcepath" );
  -            cmd.createArgument().setPath( src );
  -            if( target != null )
  -            {
  -                cmd.createArgument().setValue( "-target" );
  -                cmd.createArgument().setValue( target );
  -            }
  -            if( m_bootclasspath != null )
  -            {
  -                cmd.createArgument().setValue( "-bootclasspath" );
  -                cmd.createArgument().setPath( m_bootclasspath );
  -            }
  -            if( m_extdirs != null )
  -            {
  -                cmd.createArgument().setValue( "-extdirs" );
  -                cmd.createArgument().setPath( m_extdirs );
  -            }
  +            cmd.createArgument().setValue( "-bootclasspath" );
  +            cmd.createArgument().setPath( m_bootclasspath );
  +        }
  +
  +        if( m_extdirs != null )
  +        {
  +            cmd.createArgument().setValue( "-extdirs" );
  +            cmd.createArgument().setPath( m_extdirs );
           }
   
           if( m_encoding != null )
  @@ -224,11 +200,8 @@
           }
           if( m_debug )
           {
  -            if( useDebugLevel
  -                && Project.getJavaVersion() != Project.JAVA_1_0
  -                && Project.getJavaVersion() != Project.JAVA_1_1 )
  +            if( useDebugLevel )
               {
  -
                   String debugLevel = m_attributes.getDebugLevel();
                   if( debugLevel != null )
                   {
  @@ -244,31 +217,13 @@
                   cmd.createArgument().setValue( "-g" );
               }
           }
  -        else if( Project.getJavaVersion() != Project.JAVA_1_0 &&
  -            Project.getJavaVersion() != Project.JAVA_1_1 )
  +        else
           {
               cmd.createArgument().setValue( "-g:none" );
           }
           if( m_optimize )
           {
               cmd.createArgument().setValue( "-O" );
  -        }
  -
  -        if( m_depend )
  -        {
  -            if( Project.getJavaVersion().startsWith( "1.1" ) )
  -            {
  -                cmd.createArgument().setValue( "-depend" );
  -            }
  -            else if( Project.getJavaVersion().startsWith( "1.2" ) )
  -            {
  -                cmd.createArgument().setValue( "-Xdepend" );
  -            }
  -            else
  -            {
  -                final String message = "depend attribute is not supported by the modern
compiler";
  -                getLogger().warn( message );
  -            }
           }
   
           if( m_verbose )
  
  
  
  1.11      +10 -21    jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java
  
  Index: Javah.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Javah.java	30 Dec 2001 00:21:51 -0000	1.10
  +++ Javah.java	30 Dec 2001 01:14:59 -0000	1.11
  @@ -12,6 +12,7 @@
   import java.util.Iterator;
   import java.util.StringTokenizer;
   import org.apache.myrmidon.api.TaskException;
  +import org.apache.myrmidon.api.JavaVersion;
   import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.Commandline;
  @@ -267,8 +268,7 @@
           String compiler = getProject().getProperty( "build.compiler" );
           if( compiler == null )
           {
  -            if( Project.getJavaVersion() != Project.JAVA_1_1 &&
  -                Project.getJavaVersion() != Project.JAVA_1_2 )
  +            if( JavaVersion.JAVA1_2  != getJavaVersion() )
               {
                   compiler = "modern";
               }
  @@ -353,28 +353,17 @@
               cmd.createArgument().setPath( classpath );
           }
   
  -        // JDK1.1 is rather simpler than JDK1.2
  -        if( Project.getJavaVersion().startsWith( "1.1" ) )
  +        if( verbose )
           {
  -            if( verbose )
  -            {
  -                cmd.createArgument().setValue( "-v" );
  -            }
  +            cmd.createArgument().setValue( "-verbose" );
           }
  -        else
  +        if( old )
           {
  -            if( verbose )
  -            {
  -                cmd.createArgument().setValue( "-verbose" );
  -            }
  -            if( old )
  -            {
  -                cmd.createArgument().setValue( "-old" );
  -            }
  -            if( force )
  -            {
  -                cmd.createArgument().setValue( "-force" );
  -            }
  +            cmd.createArgument().setValue( "-old" );
  +        }
  +        if( force )
  +        {
  +            cmd.createArgument().setValue( "-force" );
           }
   
           if( stubs )
  
  
  
  1.19      +1 -9      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
  
  Index: JUnitTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- JUnitTask.java	29 Dec 2001 23:56:28 -0000	1.18
  +++ JUnitTask.java	30 Dec 2001 01:14:59 -0000	1.19
  @@ -20,7 +20,6 @@
   import java.util.Random;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.AntClassLoader;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.exec.Execute;
   import org.apache.tools.ant.taskdefs.exec.LogOutputStream;
  @@ -265,14 +264,7 @@
        */
       public void setMaxmemory( String max )
       {
  -        if( Project.getJavaVersion().startsWith( "1.1" ) )
  -        {
  -            createJvmarg().setValue( "-mx" + max );
  -        }
  -        else
  -        {
  -            createJvmarg().setValue( "-Xmx" + max );
  -        }
  +        createJvmarg().setValue( "-Xmx" + max );
       }
   
       /**
  
  
  
  1.13      +1 -9      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java
  
  Index: AbstractMetamataTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/AbstractMetamataTask.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AbstractMetamataTask.java	30 Dec 2001 00:21:52 -0000	1.12
  +++ AbstractMetamataTask.java	30 Dec 2001 01:14:59 -0000	1.13
  @@ -17,7 +17,6 @@
   import java.util.Random;
   import org.apache.myrmidon.api.TaskException;
   import org.apache.tools.ant.DirectoryScanner;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.exec.Execute;
   import org.apache.tools.ant.types.Argument;
  @@ -119,14 +118,7 @@
        */
       public void setMaxmemory( String max )
       {
  -        if( Project.getJavaVersion().startsWith( "1.1" ) )
  -        {
  -            createJvmarg().setValue( "-mx" + max );
  -        }
  -        else
  -        {
  -            createJvmarg().setValue( "-Xmx" + max );
  -        }
  +        createJvmarg().setValue( "-Xmx" + max );
       }
   
       /**
  
  
  
  1.14      +1 -9      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java
  
  Index: MParse.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/metamata/MParse.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- MParse.java	29 Dec 2001 23:56:49 -0000	1.13
  +++ MParse.java	30 Dec 2001 01:14:59 -0000	1.14
  @@ -14,7 +14,6 @@
   import java.util.ArrayList;
   import java.util.Random;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.exec.Execute;
   import org.apache.tools.ant.taskdefs.exec.ExecuteStreamHandler;
  @@ -102,14 +101,7 @@
        */
       public void setMaxmemory( String max )
       {
  -        if( Project.getJavaVersion().startsWith( "1.1" ) )
  -        {
  -            createJvmarg().setValue( "-mx" + max );
  -        }
  -        else
  -        {
  -            createJvmarg().setValue( "-Xmx" + max );
  -        }
  +        createJvmarg().setValue( "-Xmx" + max );
       }
   
       /**
  
  
  
  1.9       +2 -13     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java
  
  Index: DefaultRmicAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/rmic/DefaultRmicAdapter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DefaultRmicAdapter.java	30 Dec 2001 00:21:52 -0000	1.8
  +++ DefaultRmicAdapter.java	30 Dec 2001 01:14:59 -0000	1.9
  @@ -12,7 +12,6 @@
   import java.util.Random;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.myrmidon.api.TaskException;
  -import org.apache.tools.ant.Project;
   import org.apache.tools.ant.taskdefs.Rmic;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.Path;
  @@ -113,18 +112,8 @@
   
           if( attributes.getExtdirs() != null )
           {
  -            if( Project.getJavaVersion().startsWith( "1.1" ) )
  -            {
  -                /*
  -                 * XXX - This doesn't mix very well with build.systemclasspath,
  -                 */
  -                classpath.addExtdirs( attributes.getExtdirs() );
  -            }
  -            else
  -            {
  -                cmd.createArgument().setValue( "-extdirs" );
  -                cmd.createArgument().setPath( attributes.getExtdirs() );
  -            }
  +            cmd.createArgument().setValue( "-extdirs" );
  +            cmd.createArgument().setPath( attributes.getExtdirs() );
           }
   
           cmd.createArgument().setValue( "-classpath" );
  
  
  
  1.11      +4 -25     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/CommandlineJava.java
  
  Index: CommandlineJava.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/CommandlineJava.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CommandlineJava.java	30 Dec 2001 00:21:52 -0000	1.10
  +++ CommandlineJava.java	30 Dec 2001 01:14:59 -0000	1.11
  @@ -26,24 +26,21 @@
    */
   public class CommandlineJava implements Cloneable
   {
  -
       private Commandline vmCommand = new Commandline();
       private Commandline javaCommand = new Commandline();
       private SysProperties sysProperties = new SysProperties();
  -    private Path classpath = null;
  -    private String maxMemory = null;
  +    private Path classpath;
  +    private String maxMemory;
   
       /**
        * Indicate whether it will execute a jar file or not, in this case the
        * first vm option must be a -jar and the 'executable' is a jar file.
        */
  -    private boolean executeJar = false;
  -    private String vmVersion;
  +    private boolean executeJar;
   
       public CommandlineJava()
       {
           setVm( getJavaExecutableName() );
  -        setVmversion( Project.getJavaVersion() );
       }
   
       /**
  @@ -89,11 +86,6 @@
           vmCommand.setExecutable( vm );
       }
   
  -    public void setVmversion( String value )
  -    {
  -        vmVersion = value;
  -    }
  -
       /**
        * @return the name of the class to run or <tt>null</tt> if there is no
        *      class.
  @@ -185,11 +177,6 @@
           return getActualVMCommand();
       }
   
  -    public String getVmversion()
  -    {
  -        return vmVersion;
  -    }
  -
       public void addSysproperty( EnvironmentVariable sysp )
       {
           sysProperties.addVariable( sysp );
  @@ -214,7 +201,6 @@
           {
               c.classpath = (Path)classpath.clone();
           }
  -        c.vmVersion = vmVersion;
           c.executeJar = executeJar;
           return c;
       }
  @@ -285,14 +271,7 @@
           Commandline actualVMCommand = (Commandline)vmCommand.clone();
           if( maxMemory != null )
           {
  -            if( vmVersion.startsWith( "1.1" ) )
  -            {
  -                actualVMCommand.createArgument().setValue( "-mx" + maxMemory );
  -            }
  -            else
  -            {
  -                actualVMCommand.createArgument().setValue( "-Xmx" + maxMemory );
  -            }
  +            actualVMCommand.createArgument().setValue( "-Xmx" + maxMemory );
           }
           return actualVMCommand;
       }
  
  
  
  1.10      +0 -6      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java
  
  Index: Path.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/Path.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Path.java	30 Dec 2001 00:21:52 -0000	1.9
  +++ Path.java	30 Dec 2001 01:14:59 -0000	1.10
  @@ -353,12 +353,6 @@
               kaffeJarFiles.setIncludes( "*.jar" );
               addFileset( kaffeJarFiles );
           }
  -        else if( Project.getJavaVersion() == Project.JAVA_1_1 )
  -        {
  -            final String classes = System.getProperty( "java.home" ) +
  -                File.separator + "lib" + File.separator + "classes.zip";
  -            addExisting( new Path( classes ) );
  -        }
           else
           {
               // JDK > 1.1 seems to set java.home to the JRE directory.
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message