@Override
 public void execute() throws BuildException {
   Injector injector = Guice.createInjector(new SuperNannyModule());
   Util util = injector.getInstance(Util.class);
   DepFetcher fetcher = injector.getInstance(DepFetcher.class);
   if (this.skip) {
     return;
   }
   try {
     CliParser p = new CliParser();
     p.depfile = this.depFile;
     util.setRoot(new File(root));
     fetcher.resolve(new File(root), p);
   } catch (IOException e) {
     log("Errors resolving dependencies for project in " + root);
     throw new BuildException(e);
   }
 }
示例#2
0
  @Override
  public List<Requirement> parseMultipleDepFiles(CliParser p)
      throws IOException, InvalidFormatException {
    LinkedList<File> depFiles = new LinkedList<File>();
    if (p.depfile == null) {
      p.depfile = Util.DEP_FILE;
    }

    for (String depSource : p.depfile.split(",")) {
      depFiles.add(new File(depSource));
    }
    return parseMultipleDepFiles(depFiles);
  }