diff --git a/publish/src/coursier/publish/Pom.scala b/publish/src/coursier/publish/Pom.scala index d5bc6a1..a67fbe8 100644 --- a/publish/src/coursier/publish/Pom.scala +++ b/publish/src/coursier/publish/Pom.scala @@ -1,6 +1,6 @@ package coursier.publish -import coursier.core.{Configuration, ModuleName, Organization, Type} +import coursier.core.{Configuration, MinimizedExclusions, ModuleName, Organization, Type} import scala.collection.mutable import scala.xml.{Elem, Node, NodeSeq} @@ -53,7 +53,13 @@ object Pom { url: Option[String] = None, name: Option[String] = None, // TODO Accept full-fledged coursier.Dependency - dependencies: Seq[(Organization, ModuleName, String, Option[Configuration])] = Nil, + dependencies: Seq[( + Organization, + ModuleName, + String, + Option[Configuration], + MinimizedExclusions + )] = Nil, license: Option[License] = None, scm: Option[Scm] = None, developers: Seq[Developer] = Nil @@ -126,13 +132,21 @@ object Pom { { dependencies.map { - case (depOrg, depName, ver, confOpt) => + case (depOrg, depName, ver, confOpt, exclusions) => {depOrg.value} {depName.value} {ver} + {confOpt.fold[NodeSeq](Nil)(c => {c})} { - confOpt.fold[NodeSeq](Nil)(c => {c}) + if (exclusions.nonEmpty) { + exclusions.data.toSet().foreach { case (org, module) => + + {org.value} + {module.value} + + } + } } }