ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject AW: Ant arguments handling
Date Thu, 02 Apr 2009 05:52:33 GMT
> I have a build xml with target say 'compile'
> However if the user says 'ant comp' or any other target which does not
> exists, I want to handle them using a my custom code either a 
> macro or a ant
> custom task or groovy. 
> Is this possible, if yes, could you pl. let me know the right 
> place to get
> more info on this.

While this scenario is directly supported it could be achieved using
some hooks:
- the execution of targets is delegated by the
  to an Executor
  line 775: project.executeTargets(targets);
    public void executeTargets(Vector names) throws BuildException {
        getExecutor().executeTargets( ... );

   getExecutor() returns an implementation of The 
   class to return is defined by the property "ant.executor.class".

- you could implement your own executor which works like
    executeTargets(Vector names) {
        List missingTargets = checkTargetExistence(names);
        if (missingTargets.isEmpty()) {
        } else {


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message