private List<URI> grab(Map<String, Object> dependencies) throws IOException {
    Map<String, Object> args = new HashMap<String, Object>();
    URI[] localUrls;

    //grape expects excludes key in args map
    if (dependencies.containsKey("exclude")) {
      args.put("excludes", dependencies.get("exclude"));
    }

    //Set transitive to true by default
    if (!dependencies.containsKey("transitive")) {
      dependencies.put("transitive", true);
    }

    args.put("classLoader", new GroovyClassLoader());
    System.setProperty("grape.config", ivysettingsPath);
    localUrls = Grape.resolve(args, dependencies);
    if (localUrls == null) {
      throw new IOException("Not able to download all the dependencies..");
    }
    return Arrays.asList(localUrls);
  }
@param dependencies
@return List of URIs of downloaded jars
@throws IOException
ql/src/java/org/apache/hadoop/hive/ql/util/DependencyResolver.java