Fixed json serialization turning license into {}.

This commit is contained in:
Eugene Yokota 2014-10-05 04:24:22 -04:00
parent 69faa81a70
commit 7547a70991
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))