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 EnvironmentVariable.java CommandlineJava.java EnvironmentData.java
Date Sat, 22 Dec 2001 21:46:13 GMT
donaldp     01/12/22 13:46:13

  Modified:    proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs
                        Java.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec
                        ExecTask.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb
                        WebsphereDeploymentTool.java
               proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/junit
                        JUnitTask.java
               proposal/myrmidon/src/main/org/apache/tools/ant/types
                        CommandlineJava.java EnvironmentData.java
  Added:       proposal/myrmidon/src/main/org/apache/tools/ant/types
                        EnvironmentVariable.java
  Log:
  Moved ENvironment.Variable to a top level class.
  
  Revision  Changes    Path
  1.10      +2 -1      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.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Java.java	2001/12/22 12:59:30	1.9
  +++ Java.java	2001/12/22 21:46:12	1.10
  @@ -23,6 +23,7 @@
   import org.apache.tools.ant.types.EnvironmentData;
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
  +import org.apache.tools.ant.types.EnvironmentVariable;
   
   /**
    * This task acts as a loader for java applications but allows to use the same
  @@ -166,7 +167,7 @@
        *
        * @param sysp The feature to be added to the Sysproperty attribute
        */
  -    public void addSysproperty( EnvironmentData.Variable sysp )
  +    public void addSysproperty( EnvironmentVariable sysp )
       {
           cmdl.addSysproperty( sysp );
       }
  
  
  
  1.5       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java
  
  Index: ExecTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/exec/ExecTask.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ExecTask.java	2001/12/22 21:43:49	1.4
  +++ ExecTask.java	2001/12/22 21:46:12	1.5
  @@ -21,6 +21,7 @@
   import org.apache.tools.ant.Task;
   import org.apache.tools.ant.types.Commandline;
   import org.apache.tools.ant.types.EnvironmentData;
  +import org.apache.tools.ant.types.EnvironmentVariable;
   
   /**
    * Executes a given command if the os platform is appropriate.
  @@ -175,7 +176,7 @@
        *
        * @param var The feature to be added to the Env attribute
        */
  -    public void addEnv( EnvironmentData.Variable var )
  +    public void addEnv( EnvironmentVariable var )
       {
           env.addVariable( var );
       }
  
  
  
  1.7       +2 -1      jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java
  
  Index: WebsphereDeploymentTool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/ejb/WebsphereDeploymentTool.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- WebsphereDeploymentTool.java	2001/12/22 12:57:37	1.6
  +++ WebsphereDeploymentTool.java	2001/12/22 21:46:12	1.7
  @@ -24,6 +24,7 @@
   import org.apache.tools.ant.types.EnumeratedAttribute;
   import org.apache.tools.ant.types.EnvironmentData;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.EnvironmentVariable;
   
   /**
    * Websphere deployment tool that augments the ejbjar task.
  @@ -966,7 +967,7 @@
   
                   // Set the EnvironmentData variable
   
  -                EnvironmentData.Variable var = new EnvironmentData.Variable();
  +                EnvironmentVariable var = new EnvironmentVariable();
                   var.setKey( "websphere.lib.dir" );
                   var.setValue( getTask().getProject().getProperty( "websphere.home" ) +
"/lib" );
                   javaTask.addSysproperty( var );
  
  
  
  1.11      +2 -1      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.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JUnitTask.java	2001/12/22 12:57:38	1.10
  +++ JUnitTask.java	2001/12/22 21:46:13	1.11
  @@ -30,6 +30,7 @@
   import org.apache.tools.ant.types.EnumeratedAttribute;
   import org.apache.tools.ant.types.EnvironmentData;
   import org.apache.tools.ant.types.Path;
  +import org.apache.tools.ant.types.EnvironmentVariable;
   
   /**
    * Ant task to run JUnit tests. <p>
  @@ -319,7 +320,7 @@
        *
        * @param sysp The feature to be added to the Sysproperty attribute
        */
  -    public void addSysproperty( EnvironmentData.Variable sysp )
  +    public void addSysproperty( EnvironmentVariable sysp )
       {
           commandline.addSysproperty( sysp );
       }
  
  
  
  1.6       +2 -2      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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CommandlineJava.java	2001/12/22 21:43:49	1.5
  +++ CommandlineJava.java	2001/12/22 21:46:13	1.6
  @@ -189,7 +189,7 @@
           return vmVersion;
       }
   
  -    public void addSysproperty( EnvironmentData.Variable sysp )
  +    public void addSysproperty( EnvironmentVariable sysp )
       {
           sysProperties.addVariable( sysp );
       }
  @@ -341,7 +341,7 @@
   
                   for( Iterator e = m_variables.iterator(); e.hasNext(); )
                   {
  -                    EnvironmentData.Variable v = (EnvironmentData.Variable)e.next();
  +                    EnvironmentVariable v = (EnvironmentVariable)e.next();
                       p.put( v.getKey(), v.getValue() );
                   }
                   System.setProperties( p );
  
  
  
  1.3       +2 -37     jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/EnvironmentData.java
  
  Index: EnvironmentData.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/EnvironmentData.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EnvironmentData.java	2001/12/22 21:43:49	1.2
  +++ EnvironmentData.java	2001/12/22 21:46:13	1.3
  @@ -28,50 +28,15 @@
           final int size = m_variables.size();
           for( int i = 0; i < size; i++ )
           {
  -            final Variable variable = (Variable)m_variables.get( i );
  +            final EnvironmentVariable variable = (EnvironmentVariable)m_variables.get(
i );
               environment.setProperty( variable.getKey(), variable.getValue() );
           }
           return environment;
       }
   
  -    public void addVariable( Variable var )
  +    public void addVariable( EnvironmentVariable var )
       {
           m_variables.add( var );
       }
   
  -    public static class Variable
  -    {
  -        private String m_key;
  -        private String m_value;
  -
  -        public void setFile( final File file )
  -        {
  -            m_value = file.getAbsolutePath();
  -        }
  -
  -        public void setKey( final String key )
  -        {
  -            m_key = key;
  -        }
  -
  -        public void setPath( final Path path )
  -        {
  -            m_value = path.toString();
  -        }
  -
  -        public void setValue( final String value )
  -        {
  -            m_value = value;
  -        }
  -
  -        public String getKey()
  -        {
  -            return m_key;
  -        }
  -
  -        public String getValue()
  -        {
  -            return m_value;
  -        }
  -    }
   }
  
  
  
  1.1                  jakarta-ant/proposal/myrmidon/src/main/org/apache/tools/ant/types/EnvironmentVariable.java
  
  Index: EnvironmentVariable.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included  with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.tools.ant.types;
  
  import java.io.File;
  
  public class EnvironmentVariable
  {
      private String m_key;
      private String m_value;
  
      public void setFile( final File file )
      {
          m_value = file.getAbsolutePath();
      }
  
      public void setKey( final String key )
      {
          m_key = key;
      }
  
      public void setPath( final Path path )
      {
          m_value = path.toString();
      }
  
      public void setValue( final String value )
      {
          m_value = value;
      }
  
      public String getKey()
      {
          return m_key;
      }
  
      public String getValue()
      {
          return m_value;
      }
  }
  
  
  

--
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