IvyDEMessage.verbose("\t\tmatched (version are ignored)");
} else {
IvyDEMessage.verbose("\t\tversion matched");
}
Artifact af = new DefaultArtifact(md.getModuleRevisionId(),
md.getPublicationDate(), p.getFullPath().toString(),
ECLIPSE_PROJECT_TYPE, ECLIPSE_PROJECT_EXTENSION);
DependencyArtifactDescriptor[] dArtifacts = dd.getAllDependencyArtifacts();
if (dArtifacts != null) {
// the dependency is declaring explicitely some artifacts to download
// we need to trick to and map these requested artifact by the Eclipse
// project
// we need the context which is used when downloading data, which is the
// parent
// of the current one
// so let's hack: popContext (the child), getContext (the parent), setVar,
// pushContext (child)
IvyContext currentContext = IvyContext.popContext();
IvyContext parentContext = IvyContext.getContext();
Map/* <Artifact, Artifact> */workspaceArtifacts = (Map) parentContext
.get(IVYDE_WORKSPACE_ARTIFACTS);
if (workspaceArtifacts == null) {
workspaceArtifacts = new HashMap();
parentContext.set(IVYDE_WORKSPACE_ARTIFACTS, workspaceArtifacts);
}
for (int j = 0; j < dArtifacts.length; j++) {
Artifact artifact = new MDArtifact(md, dArtifacts[j].getName(),
dArtifacts[j].getType(), dArtifacts[j].getExt(),
dArtifacts[j].getUrl(),
dArtifacts[j].getQualifiedExtraAttributes());
workspaceArtifacts.put(artifact, af);
}