ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21421] - [Patch] to allow to run several targets without rerunning their dependencies
Date Fri, 03 Sep 2004 19:57:56 GMT
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 alexeys@inventigo.com  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: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message