diff --git a/plugin/src/main/scala-2.10/coursier/MakeIvyXml.scala b/plugin/src/main/scala-2.10/coursier/MakeIvyXml.scala
index 8a75ae8d9..4c1bc7c74 100644
--- a/plugin/src/main/scala-2.10/coursier/MakeIvyXml.scala
+++ b/plugin/src/main/scala-2.10/coursier/MakeIvyXml.scala
@@ -6,27 +6,26 @@ object MakeIvyXml {
def apply(project: Project): Node = {
- val baseInfoAttrs = .attributes
-
- val infoAttrs = project.module.attributes.foldLeft(baseInfoAttrs) {
+ val infoAttrs = project.module.attributes.foldLeft[xml.MetaData](xml.Null) {
case (acc, (k, v)) =>
new PrefixedAttribute("e", k, v, acc)
}
val licenseElems = project.info.licenses.map {
case (name, urlOpt) =>
- var n =
- for (url <- urlOpt)
- n = n % .attributes
- n
+ val n =
+
+ urlOpt.fold(n) { url =>
+ n % .attributes
+ }
}
val infoElem = {
-
+
{licenseElems}
{project.info.description}
@@ -34,10 +33,11 @@ object MakeIvyXml {
val confElems = project.configurations.toVector.map {
case (name, extends0) =>
- var n =
+ val n =
if (extends0.nonEmpty)
- n = n % .attributes
- n
+ n % .attributes
+ else
+ n
}
val publications = project
@@ -47,10 +47,12 @@ object MakeIvyXml {
val publicationElems = publications.map {
case (pub, configs) =>
- var n =
+ val n =
+
if (pub.classifier.nonEmpty)
- n = n % .attributes
- n
+ n % .attributes
+ else
+ n
}
val dependencyElems = project.dependencies.toVector.map {