mirror of https://github.com/sbt/sbt.git
Only write 'info' tag if user has not provided one.
This commit is contained in:
parent
1d40e5e71d
commit
1a74b7e863
|
|
@ -245,15 +245,20 @@ private object IvySbt
|
||||||
map
|
map
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** Creates a full ivy file for 'module' using the 'content' XML as the part after the <info>...</info> section. */
|
/** Creates a full ivy file for 'module' using the 'dependencies' XML as the part after the <info>...</info> section. */
|
||||||
private def wrapped(module: ModuleID, content: scala.xml.NodeSeq) =
|
private def wrapped(module: ModuleID, dependencies: scala.xml.NodeSeq) =
|
||||||
{
|
{
|
||||||
import module._
|
import module._
|
||||||
<ivy-module version="2.0">
|
<ivy-module version="2.0">
|
||||||
|
{ if(hasInfo(dependencies))
|
||||||
|
scala.xml.NodeSeq.Empty
|
||||||
|
else
|
||||||
<info organisation={organization} module={name} revision={revision}/>
|
<info organisation={organization} module={name} revision={revision}/>
|
||||||
{content}
|
}
|
||||||
|
{dependencies}
|
||||||
</ivy-module>
|
</ivy-module>
|
||||||
}
|
}
|
||||||
|
private def hasInfo(x: scala.xml.NodeSeq) = !(<g>{x}</g> \ "info").isEmpty
|
||||||
/** Parses the given in-memory Ivy file 'xml', using the existing 'moduleID' and specifying the given 'defaultConfiguration'. */
|
/** 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 =
|
private def parseIvyXML(settings: IvySettings, xml: scala.xml.NodeSeq, moduleID: DefaultModuleDescriptor, defaultConfiguration: String, validate: Boolean): CustomXmlParser.CustomParser =
|
||||||
parseIvyXML(settings, xml.toString, moduleID, defaultConfiguration, validate)
|
parseIvyXML(settings, xml.toString, moduleID, defaultConfiguration, validate)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue