ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject AntRun or modification to antcall
Date Wed, 30 Jul 2003 10:31:12 GMT

In some cases I find that using antcall is slow and using dependencies 
is impractical. Thus I have come up with this task, that simply executes 
a target without any dependency checking:

/**
  * Ant tasks that runs a target without creating a new project.
  *
  * @author Nicola Ken Barozzi nicolaken@apache.org
  */
public class RunTargetTask extends Task {

    private String target = null;

     public void setTarget( String target ) {
       this.target = target;
     }

     public void execute() throws BuildException{
       if (target == null){
         throw new BuildException("target property required");
       }

       getProject().executeTarget(target);
     }
}


I have asked ant-contrib, but I was suggested to ask here is this 
behaviour could be inserted in antcall and if it was something that 
could go in Ant.

Example usage:

  <antcall target="xyz" checkDependencies="false"/>

What do you guys think?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



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


Mime
View raw message