-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
74 lines (56 loc) · 1.75 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
organization := "com.github.cjmx"
name := "cjmx-ext"
version := "1.1.0-SNAPSHOT"
scalaVersion := "2.10.2"
autoScalaLibrary := false
crossPaths := false
scalacOptions ++= Seq(
"-deprecation",
"-unchecked",
"-optimise",
"-Xcheckinit",
"-Xlint",
"-Xverify",
"-Yclosure-elim",
"-Yinline",
"-Ywarn-all",
"-feature")
javacOptions ++= Seq("-source", "1.5", "-target", "1.5", "-Xlint:deprecation")
javacOptions in doc := Seq("-source", "1.5")
licenses += ("Three-clause BSD-style", url("http://github.com/cjmx/cjmx/blob/master/LICENSE"))
triggeredMessage := (_ => Watched.clearScreen)
libraryDependencies += "org.scalatest" % "scalatest_2.10" % "2.0.RC1-SNAP4" % "test"
publishTo <<= version { v: String =>
val nexus = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
publishMavenStyle := true
publishArtifact in Test := false
pomIncludeRepository := { x => false }
pomExtra := (
<url>http://github.com/cjmx/cjmx-ext</url>
<scm>
<url>[email protected]:cjmx/cjmx-ext.git</url>
<connection>scm:git:[email protected]:cjmx/cjmx-ext.git</connection>
</scm>
<developers>
<developer>
<id>mpilquist</id>
<name>Michael Pilquist</name>
<url>http://github.com/mpilquist</url>
</developer>
</developers>
)
pomPostProcess := { (node) =>
import scala.xml._
import scala.xml.transform._
def stripIf(f: Node => Boolean) = new RewriteRule {
override def transform(n: Node) =
if (f(n)) NodeSeq.Empty else n
}
val stripTestScope = stripIf { n => n.label == "dependency" && (n \ "scope").text == "test" }
new RuleTransformer(stripTestScope).transform(node)(0)
}