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" diff --git a/project/Util.scala b/project/Util.scala index c26368b79..0edbb7b66 100644 --- a/project/Util.scala +++ b/project/Util.scala @@ -11,7 +11,7 @@ object Util def noPublish(p: Project) = p.copy(settings = noRemotePublish(p.settings)) def noRemotePublish(in: Seq[Setting[_]]) = in filterNot { s => s.key == deliver || s.key == publish } - lazy val noExtra = projectDependencies ~= { _.map(_.copy(extraAttributes = Map.empty)) } // not sure why this is needed + lazy val noExtra = projectDependencies ~= { _.map(_.copy(extraAttributes = Map.empty)) } // remove after 0.10.2 def project(path: File, nameString: String) = Project(normalize(nameString), path) settings( name := nameString, noExtra ) def baseProject(path: File, nameString: String) = project(path, nameString) settings( base : _*)