ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adammurd...@apache.org
Subject cvs commit: jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant Ant1CompatProject.java Ant1CompatTaskAdapter.java Ant1CompatTypeInstanceTask.java Task.java
Date Mon, 27 May 2002 02:10:18 GMT
adammurdoch    02/05/26 19:10:18

  Modified:    ant1compat/src/java/org/apache/tools/ant
                        Ant1CompatProject.java Ant1CompatTaskAdapter.java
                        Ant1CompatTypeInstanceTask.java Task.java
  Log:
  No need to prefix task and type names with 'ant1.' any more.
  
  Revision  Changes    Path
  1.7       +2 -4      jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatProject.java
  
  Index: Ant1CompatProject.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatProject.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Ant1CompatProject.java	23 May 2002 04:31:14 -0000	1.6
  +++ Ant1CompatProject.java	27 May 2002 02:10:18 -0000	1.7
  @@ -35,12 +35,11 @@
    * Ant1 original, this class contains the extensions.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.6 $ $Date: 2002/05/23 04:31:14 $
  + * @version $Revision: 1.7 $ $Date: 2002/05/27 02:10:18 $
    */
   public class Ant1CompatProject
       extends Project
   {
  -    public static final String ANT1_TASK_PREFIX = "ant1.";
       public static final String MYRMIDON_PROJECT_PROP =
           org.apache.myrmidon.interfaces.oldmodel.Project.PROJECT;
       public static final String ANT1_PROJECT_PROP = "ant1.project";
  @@ -268,10 +267,9 @@
       public void addTaskDefinition( String taskName, Class taskClass )
           throws BuildException
       {
  -        String ant2name = ANT1_TASK_PREFIX + taskName;
           try
           {
  -            registerType( org.apache.myrmidon.api.Task.ROLE, ant2name, taskClass );
  +            registerType( org.apache.myrmidon.api.Task.ROLE, taskName, taskClass );
           }
           catch( Exception e )
           {
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatTaskAdapter.java
  
  Index: Ant1CompatTaskAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatTaskAdapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Ant1CompatTaskAdapter.java	21 Apr 2002 02:03:04 -0000	1.2
  +++ Ant1CompatTaskAdapter.java	27 May 2002 02:10:18 -0000	1.3
  @@ -16,7 +16,7 @@
    * An adapter for running (in Myrmidon) Ant1 tasks which do not extend Task
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/21 02:03:04 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/27 02:10:18 $
    */
   public class Ant1CompatTaskAdapter
       extends TaskAdapter
  @@ -36,7 +36,7 @@
       {
           // Create a new instance of the proxy object,
           // and configure it.
  -        String taskName = getAnt1Name( element.getName() );
  +        final String taskName = element.getName();
   
           Class taskClass = (Class)project.getTaskDefinitions().get( taskName );
   
  
  
  
  1.3       +2 -2      jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatTypeInstanceTask.java
  
  Index: Ant1CompatTypeInstanceTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatTypeInstanceTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Ant1CompatTypeInstanceTask.java	21 Apr 2002 02:03:04 -0000	1.2
  +++ Ant1CompatTypeInstanceTask.java	27 May 2002 02:10:18 -0000	1.3
  @@ -17,7 +17,7 @@
    * A task for instantiating Ant1 datatypes.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/21 02:03:04 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/27 02:10:18 $
    */
   public class Ant1CompatTypeInstanceTask
       extends Task
  @@ -35,7 +35,7 @@
           }
   
           String typeName = element.getName();
  -        Object datatype = project.createDataType( getAnt1Name( typeName ) );
  +        Object datatype = project.createDataType( typeName );
   
           // Configure the datatype. The type is added to the project
           // as a reference during configuration.
  
  
  
  1.3       +1 -12     jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Task.java
  
  Index: Task.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Task.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Task.java	21 Apr 2002 02:03:04 -0000	1.2
  +++ Task.java	27 May 2002 02:10:18 -0000	1.3
  @@ -21,7 +21,7 @@
    * all of the Myrmidon-specific adaptations.
    *
    * @author <a href="mailto:darrell@apache.org">Darrell DeBoer</a>
  - * @version $Revision: 1.2 $ $Date: 2002/04/21 02:03:04 $
  + * @version $Revision: 1.3 $ $Date: 2002/05/27 02:10:18 $
    */
   public class Task
       extends OriginalAnt1Task
  @@ -105,16 +105,5 @@
           configurer.createChildren();
           configurer.configure();
           this.init();
  -    }
  -
  -    /**
  -     * Returns the name of a Task/Datatype as referred to by Ant1 code, without
  -     * the "ant1." prefix.
  -     * @param fullName The full name as known by Myrmidon.
  -     * @return the name without the Ant1 prefix.
  -     */
  -    protected String getAnt1Name( String fullName )
  -    {
  -        return fullName.substring( Ant1CompatProject.ANT1_TASK_PREFIX.length() );
       }
   }
  
  
  

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