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 CallTarget.java
Date Fri, 15 Sep 2000 07:37:15 GMT
bodewig     00/09/15 00:37:13

  Modified:    src/main/org/apache/tools/ant/taskdefs Ant.java
                        CallTarget.java
  Log:
  Adapt <ant> to the fact that <property> does its work in execute() and
  not in init() now.
  
  Make Microsoft's tools happy by not using "delegate" as a variable
  name.
  
  Improve handling of <ant>'s antfile attribute. This should work for
  absolute paths now.
  
  Revision  Changes    Path
  1.16      +5 -2      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.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Ant.java	2000/09/06 11:34:41	1.15
  +++ Ant.java	2000/09/15 07:37:10	1.16
  @@ -170,13 +170,16 @@
               Enumeration e = properties.elements();
               while (e.hasMoreElements()) {
                   Property p=(Property) e.nextElement();
  -                p.init();
  +                p.execute();
               }
               
               if (antFile == null) 
                   antFile = "build.xml";
   
  -            antFile = (new File(dir, antFile)).getAbsolutePath();
  +            File file = new File(antFile);
  +            if (!file.isAbsolute()) {
  +                antFile = (new File(dir, antFile)).getAbsolutePath();
  +            }
   
               p1.setUserProperty( "ant.file" , antFile );
               ProjectHelper.configureProject(p1, new File(antFile));
  
  
  
  1.4       +11 -11    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
  
  Index: CallTarget.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CallTarget.java	2000/07/24 14:54:49	1.3
  +++ CallTarget.java	2000/09/15 07:37:11	1.4
  @@ -80,15 +80,15 @@
    */
   public class CallTarget extends Task {
   
  -    private Ant delegate;
  +    private Ant callee;
       private String subTarget;
   
       public void init() {
  -        delegate = (Ant) project.createTask("ant");
  -        delegate.setOwningTarget(target);
  -        delegate.setTaskName(getTaskName());
  -        delegate.setLocation(location);
  -        delegate.init();
  +        callee = (Ant) project.createTask("ant");
  +        callee.setOwningTarget(target);
  +        callee.setTaskName(getTaskName());
  +        callee.setLocation(location);
  +        callee.init();
       }
   
       public void execute() {
  @@ -97,14 +97,14 @@
                                        location);
           }
           
  -        delegate.setDir(project.getBaseDir());
  -        delegate.setAntfile(project.getProperty("ant.file"));
  -        delegate.setTarget(subTarget);
  -        delegate.execute();
  +        callee.setDir(project.getBaseDir());
  +        callee.setAntfile(project.getProperty("ant.file"));
  +        callee.setTarget(subTarget);
  +        callee.execute();
       }
   
       public Property createParam() {
  -        return delegate.createProperty();
  +        return callee.createProperty();
       }
   
       public void setTarget(String target) {
  
  
  

Mime
View raw message