From 73d52dc03130eb929194969cd8b4194c3100d2be Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Fri, 29 Jul 2011 23:33:10 -0400 Subject: [PATCH] fix inter-project dependencies involving extra attributes --- ivy/Ivy.scala | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ivy/Ivy.scala b/ivy/Ivy.scala index 89aa46592..8f8829328 100644 --- a/ivy/Ivy.scala +++ b/ivy/Ivy.scala @@ -141,7 +141,6 @@ final class IvySbt(val configuration: IvyConfiguration) log.debug("Using inline dependencies specified in Scala" + (if(ivyXML.isEmpty) "." else " and XML.")) val parser = IvySbt.parseIvyXML(ivy.getSettings, IvySbt.wrapped(module, ivyXML), moduleID, defaultConf.name, validate) - IvySbt.addDependencies(moduleID, dependencies, parser) IvySbt.addMainArtifact(moduleID) (moduleID, parser.getDefaultConf) @@ -351,11 +350,11 @@ private object IvySbt private def wrapped(module: ModuleID, dependencies: NodeSeq) = { import module._ - + { if(hasInfo(module, dependencies)) NodeSeq.Empty else - + addExtraAttributes(, module.extraAttributes) } {dependencies} { @@ -364,6 +363,8 @@ private object IvySbt } } + private[this] def addExtraAttributes(elem: scala.xml.Elem, extra: Map[String, String]): scala.xml.Elem = + (elem /: extra) { case (e, (key,value) ) => e % new scala.xml.UnprefixedAttribute(key, value, scala.xml.Null) } private def hasInfo(module: ModuleID, x: scala.xml.NodeSeq) = { val info = {x} \ "info"