Merge pull request #1644 from sbt/wip/cached-resolution-bug

[0.13.7] Fixes json serialization turning license into {}.
This commit is contained in:
eugene yokota 2014-10-06 13:52:28 -04:00
commit fab566735d
2 changed files with 3 additions and 2 deletions

View File

@ -128,7 +128,8 @@ object IvyRetrieve {
val licenses: Seq[(String, Option[String])] = mdOpt match {
case Some(md) => md.getLicenses.toArray.toVector collect {
case lic: IvyLicense if Option(lic.getName).isDefined =>
(lic.getName, nonEmptyString(lic.getUrl))
val temporaryURL = "http://localhost"
(lic.getName, nonEmptyString(lic.getUrl) orElse { Some(temporaryURL) })
}
case _ => Nil
}

View File

@ -305,7 +305,7 @@ object Resolver {
def loadHomeFromSettings(f: () => File): Option[File] =
try {
val file = f()
if(!file.exists) None
if (!file.exists) None
else ((XML.loadFile(file) \ "localRepository").text match {
case "" => None
case e @ _ => Some(new File(e))