Skip to content

Commit

Permalink
Build: pom.xml fixes
Browse files Browse the repository at this point in the history
Removed scoverage plugin from the published pom (ref: scoverage/sbt-scoverage#153)
Updated scm section
  • Loading branch information
rozza committed May 18, 2016
1 parent 7b45275 commit 21eab20
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
22 changes: 16 additions & 6 deletions project/Publish.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
import java.io.FileInputStream
import java.util.Properties

import scala.xml.Elem
import scala.xml.transform.{RewriteRule, RuleTransformer}

import com.typesafe.sbt.pgp.{PgpKeys, PgpSettings}
import sbt.Keys._
import sbt._
Expand All @@ -35,7 +38,16 @@ object Publish {
def settings: Seq[Def.Setting[_]] = {
val defaults = Seq(
publishArtifact in packageDoc := true,
sources in (Compile,doc) := publishDocSrcs(scalaVersion.value, (sources in (Compile,doc)).value)
sources in (Compile,doc) := publishDocSrcs(scalaVersion.value, (sources in (Compile,doc)).value),
pomPostProcess := { (node: xml.Node) =>
new RuleTransformer(new RewriteRule {
override def transform(node: xml.Node): Seq[xml.Node] = node match {
case e: Elem
if e.label == "dependency" && e.child.exists(child => child.label == "groupId" && child.text == "org.scoverage") => Nil
case _ => Seq(node)
}
}).transform(node).head
}
)

if (!propFile.exists) {
Expand Down Expand Up @@ -79,7 +91,7 @@ object Publish {
publishArtifact in Test := false,
pomIncludeRepository := { _ => false },
pomExtra :=
<url>http://mongodb.github.io/mongo-scala-driver</url>
<url>http://github.com/mongo-spark</url>
<licenses>
<license>
<name>Apache 2</name>
Expand All @@ -88,10 +100,8 @@ object Publish {
</license>
</licenses>
<scm>
<url>//TODO
</url>
<connection>//TODO
</connection>
<url>git@github.com:mongodb/mongo-spark.git</url>
<connection>scm:git:git@github.com:mongodb/mongo-spark.git</connection>
</scm>
<developers>
<developer>
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.8.0")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.5.1")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.1.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.5")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")

0 comments on commit 21eab20

Please sign in to comment.