ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Ant.java
Date Wed, 12 Jul 2000 06:36:13 GMT
bodewig     00/07/11 23:36:12

  Modified:    src/main/org/apache/tools/ant Project.java
               src/main/org/apache/tools/ant/taskdefs Ant.java
  Log:
  Make subprojects aware of custom tasks.
  
  Submitted by:	Glenn McAllister <glennm@ca.ibm.com>
  
  Revision  Changes    Path
  1.29      +4 -0      jakarta-ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- Project.java	2000/07/09 03:48:11	1.28
  +++ Project.java	2000/07/12 06:36:10	1.29
  @@ -319,6 +319,10 @@
           taskClassDefinitions.put(taskName, taskClass);
       }
   
  +    public Hashtable getTaskDefinitions() {
  +        return taskClassDefinitions;
  +    }
  +
       /**
        * This call expects to add a <em>new</em> Target.
        * @param target is the Target to be added to the current
  
  
  
  1.10      +8 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java
  
  Index: Ant.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Ant.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Ant.java	2000/07/11 11:14:48	1.9
  +++ Ant.java	2000/07/12 06:36:11	1.10
  @@ -106,6 +106,14 @@
   
           p1.init();
   
  +        Hashtable taskdefs = project.getTaskDefinitions();
  +        Enumeration et = taskdefs.keys();
  +        while (et.hasMoreElements()) {
  +            String taskName = (String) et.nextElement();
  +            Class taskClass = (Class) taskdefs.get(taskName);
  +            p1.addTaskDefinition(taskName, taskClass);
  +        }
  +
           // set user-define properties
           Hashtable prop1 = project.getProperties();
           Enumeration e = prop1.keys();
  
  
  

Mime
View raw message