preserve extraAttributes in a couple of places

This commit is contained in:
Mark Harrah 2011-07-23 23:07:54 -04:00
parent 7bb3cddf3c
commit 703c1e841a
2 changed files with 6 additions and 2 deletions

View File

@ -186,7 +186,7 @@ object IvyActions
def extractExcludes(report: UpdateReport): Map[ModuleID, Set[String]] =
report.allMissing flatMap { case (_, mod, art) => art.classifier.map { c => (restrictedCopy(mod), c) } } groupBy(_._1) map { case (mod, pairs) => (mod, pairs.map(_._2).toSet) }
private[this] def restrictedCopy(m: ModuleID) = ModuleID(m.organization, m.name, m.revision, crossVersion = m.crossVersion)
private[this] def restrictedCopy(m: ModuleID) = ModuleID(m.organization, m.name, m.revision, crossVersion = m.crossVersion, extraAttributes = m.extraAttributes)
private[this] def resolve(logging: UpdateLogging.Value)(ivy: Ivy, module: DefaultModuleDescriptor, defaultConf: String): (ResolveReport, Option[ResolveException]) =
{
val resolveOptions = new ResolveOptions

View File

@ -39,7 +39,11 @@ object IvyRetrieve
confReport.getEvictedNodes.map(node => toModuleID(node.getId))
def toModuleID(revID: ModuleRevisionId): ModuleID =
ModuleID(revID.getOrganisation, revID.getName, revID.getRevision)
{
import collection.JavaConverters._
val extra = revID.getExtraAttributes.asInstanceOf[java.util.Map[String,String]].asScala
ModuleID(revID.getOrganisation, revID.getName, revID.getRevision, extraAttributes = extra.toMap)
}
def toArtifact(art: IvyArtifact): Artifact =
{