Hi,
I'm running Ivy through the command line and my current requirement with
Ivy is not to download and cache artifacts. I tried setting useOrigin on
the command line but it seems like it may not be accounted for. Please
note my inline comments below:
ResolveOptions resolveOptions = new
ResolveOptions().setConfs(confs)
.setValidate(validate);
// This call to resolve does not account for any use of useOrigin it
seems, thus it attempts to download dependencies to the cache
ResolveReport report = ivy.resolve(ivyfile.toURL(),
resolveOptions);
if (report.hasError()) {
System.exit(1);
}
ModuleDescriptor md = report.getModuleDescriptor();
if (confs.length == 1 && "*".equals(confs[0])) {
confs = md.getConfigurationsNames();
}
if (line.hasOption("retrieve")) {
String retrievePattern =
settings.substitute(line.getOptionValue("retrieve"));
if (retrievePattern.indexOf("[") == -1) {
retrievePattern = retrievePattern +
"/lib/[conf]/[artifact].[ext]";
}
// Here the option is checked by this is not reached, and is for a
different purpose anyway
ivy.retrieve(md.getModuleRevisionId(), retrievePattern,
new RetrieveOptions()
.setConfs(confs).setSync(line.hasOption("sync"))
.setUseOrigin(line.hasOption("useOrigin")));
Am I missing anything here?
thanks
paul