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 [EMAIL PROTECTED]
 */
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                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to