From a33bb71f502dc7fd22aba1bfa7c5d52acd6200d3 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Sun, 11 Oct 2009 15:43:42 -0400 Subject: [PATCH] Only write 'info' tag if user has not provided one. --- ivy/Ivy.scala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ivy/Ivy.scala b/ivy/Ivy.scala index fee07b00b..6b7b89dce 100644 --- a/ivy/Ivy.scala +++ b/ivy/Ivy.scala @@ -245,15 +245,20 @@ private object IvySbt map } } - /** Creates a full ivy file for 'module' using the 'content' XML as the part after the <info>...</info> section. */ - private def wrapped(module: ModuleID, content: scala.xml.NodeSeq) = + /** Creates a full ivy file for 'module' using the 'dependencies' XML as the part after the <info>...</info> section. */ + private def wrapped(module: ModuleID, dependencies: scala.xml.NodeSeq) = { import module._ - - {content} + { if(hasInfo(dependencies)) + scala.xml.NodeSeq.Empty + else + + } + {dependencies} } + private def hasInfo(x: scala.xml.NodeSeq) = !({x} \ "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)