diff --git a/ivy/Ivy.scala b/ivy/Ivy.scala
index 116f95418..57e19ec4b 100644
--- a/ivy/Ivy.scala
+++ b/ivy/Ivy.scala
@@ -336,7 +336,7 @@ private object IvySbt
{
import module._
- { if(hasInfo(dependencies))
+ { if(hasInfo(module, dependencies))
NodeSeq.Empty
else
@@ -348,7 +348,24 @@ private object IvySbt
}
}
- private def hasInfo(x: scala.xml.NodeSeq) = !({x} \ "info").isEmpty
+ private def hasInfo(module: ModuleID, x: scala.xml.NodeSeq) =
+ {
+ val info = {x} \ "info"
+ if(!info.isEmpty)
+ {
+ def check(found: NodeSeq, expected: String, label: String) =
+ if(found.isEmpty)
+ error("Missing " + label + " in inline Ivy XML.")
+ else {
+ val str = found.text
+ if(str != expected) error("Inconsistent " + label + " in inline Ivy XML. Expected '" + expected + "', got '" + str + "'")
+ }
+ check(info \ "@organisation", module.organization, "organisation")
+ check(info \ "@module", module.name, "name")
+ check(info \ "@revision", module.revision, "version")
+ }
+ !info.isEmpty
+ }
/** Parses the given in-memory Ivy file 'xml', using the existing 'moduleID' and specifying the given 'defaultConfiguration'. */
private def parseIvyXML(settings: IvySettings, xml: scala.xml.NodeSeq, moduleID: DefaultModuleDescriptor, defaultConfiguration: String, validate: Boolean): CustomXmlParser.CustomParser =
parseIvyXML(settings, xml.toString, moduleID, defaultConfiguration, validate)