Skip to content

Commit

Permalink
Merge pull request #4 from heremaps/fix_pom_publication
Browse files Browse the repository at this point in the history
Fix pom publication
  • Loading branch information
molekyla authored Sep 18, 2023
2 parents 3382a2b + b64acdf commit abde0f9
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations._
import sbtrelease.Version
import scala.xml.{Node => XmlNode, NodeSeq => XmlNodeSeq, _}
import scala.xml.transform._

val organizationSettings: Seq[Setting[_]] = Seq(
scalaVersion := "2.12.15",
Expand Down Expand Up @@ -101,11 +103,20 @@ lazy val publishSettings = Seq(
},
pomIncludeRepository := { _ => false },
publishMavenStyle := true,
makePom / publishArtifact := false,
publishConfiguration := publishConfiguration.value.withOverwrite(true)
publishConfiguration := publishConfiguration.value.withOverwrite(true),
pomPostProcess := { node: XmlNode =>
val rule = new RewriteRule {
override def transform(n: XmlNode): XmlNodeSeq = n match {
case e: Elem if e != null && e.label == "artifactId" && e.text == "sbt-bom" =>
<artifactId>sbt-bom_2.12_1.0</artifactId>
case _ => n
}
}
new RuleTransformer(rule).transform(node).head
}
)

pomExtra :=
ThisBuild / pomExtra :=
<licenses>
<license>
<name>Apache License, Version 2.0</name>
Expand Down

0 comments on commit abde0f9

Please sign in to comment.