DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=21421>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=21421

[Patch] to allow to run several targets without rerunning their dependencies





------- Additional Comments From [EMAIL PROTECTED]  2004-09-03 19:57 -------
I think the logic should be different:

class Main {
  String executorClassName;
  void processArgs(...) {
    
  ...
    else if (arg.equals("-keep-going")...) {
     this.executorClassName=KeepGoingExecutor.class.getName(); // with optional 
check that the field is not set already
    }
    else if (arg.equals("-single-check")...) {
     executorClassName=SingleCheckExecutor.class.getName(); // with optional 
check that the field is not set already
    }
  ...
    if (definedProps.hasKey("ant.executor.class")) { // system properties too?
      executorClassName=definedProps.getProperty("ant.executor.class");
    }
  }

  void runBuild() {
    ...
    
project.setExecutor((Executor)Class.forName(executorClassName).newInstance());
    ...
  }
}

class Project {
// remove keepGoingMode
// add
  public final Executor executor;

  void initSubProject(...) {
    ...
    subProject.setExecutor(this.executor);
  }

  void executeTargets(list) { // executeTarget,....
    // maybe check if executor==null
    this.executor.executeTargets(list);
  }
}

class DefaultExecutor implements Executor {
  private boolean keepGoingMode;
  public void executeTargets() {
    ...
  }
}
class KeepGoingExecutor extends DefaultExecutor { // for code reuse
  KeepGoingExecutor() {
    super(true); // keep-going mode
  }
}

class ParallelExecutor {
  // thread pool, ...
}
class NoDependenciesExecutor {
}
.....

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

Reply via email to