Пример #1
0
  private Path buildClasspath(Build build, Scope scope, String tag) {
    List<File> jars = build.getSolver().getClasspath(scope, tag);
    Path cp = new Path(getProject());
    // output folder
    PathElement of = cp.createPathElement();
    of.setLocation(build.getConfig().getOutputDirectory(scope));
    if (!scope.isDefault()) {
      of.setLocation(build.getConfig().getOutputDirectory(Scope.compile));
    }

    // add project dependencies
    for (File folder : buildDependentProjectsClasspath(build)) {
      PathElement element = cp.createPathElement();
      element.setLocation(folder);
    }

    // jars
    for (File jar : jars) {
      PathElement element = cp.createPathElement();
      element.setLocation(jar);
    }

    return cp;
  }
Пример #2
0
 public void setScope(String scope) {
   this.scope = Scope.fromString(scope);
 }