public int retrieve(ModuleId moduleId, String[] confs, File cache, String destFilePattern,
String destIvyPattern, Filter artifactFilter, boolean sync, boolean useOrigin) {
try {
return ivy.retrieve(new ModuleRevisionId(moduleId, Ivy.getWorkingRevision()),
destFilePattern,
new RetrieveOptions().setConfs(confs).setDestIvyPattern(destIvyPattern)
.setArtifactFilter(artifactFilter).setSync(sync).setUseOrigin(useOrigin));
} catch (IOException e) {
throw new RuntimeException(e);
}
}