-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
executable file
·143 lines (96 loc) · 5 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import com.typesafe.sbt.packager.Keys._
import PlayKeys._
lazy val root = (project in file(".")).enablePlugins(PlayScala)
name := "trt"
organization := "com.thetestpeople"
version := "0.8.1-SNAPSHOT"
scalacOptions ++= List("-deprecation", "-feature")
scalaVersion := "2.11.1"
// == Dependencies ============================================================================
libraryDependencies ++= List(
ws,
jdbc,
"com.google.guava" % "guava" % "16.0.1",
"com.google.code.findbugs" % "jsr305" % "2.0.3", // Workaround for scalac/Guava clash, SI-7751
"com.typesafe.slick" %% "slick" % "2.1.0",
"com.h2database" % "h2" % "1.3.166",
"postgresql" % "postgresql" % "9.1-901.jdbc4",
"com.ocpsoft" % "ocpsoft-pretty-time" % "1.0.7",
"joda-time" % "joda-time" % "2.3",
"org.pegdown" % "pegdown" % "1.0.2", // Needed for error when generating report: https://groups.google.com/forum/#!topic/scalatest-users/6TGms7jYn6E
"org.joda" % "joda-convert" % "1.5",
"com.github.tototoshi" %% "slick-joda-mapper" % "1.2.0",
"com.github.nscala-time" %% "nscala-time" % "1.4.0",
"commons-validator" % "commons-validator" % "1.4.0",
"commons-io" % "commons-io" % "2.2",
"org.apache.lucene" % "lucene-core" % "4.9.0",
"org.apache.lucene" % "lucene-analyzers-common" % "4.9.0",
"org.apache.lucene" % "lucene-highlighter" % "4.9.0",
"org.apache.lucene" % "lucene-queryparser" % "4.9.0",
"com.google.guava" % "guava" % "16.0.1",
"org.liquibase" % "liquibase-core" % "3.1.1",
"oro" % "oro" % "2.0.8",
"org.apache.httpcomponents" % "httpclient" % "4.3.1",
"com.xebialabs.cloud" % "overcast" % "2.4.0" exclude("org.libvirt", "libvirt"))
libraryDependencies ++= List(
"org.scalatest" %% "scalatest" % "2.2.1" % "test",
"org.seleniumhq.selenium" % "selenium-java" % "2.46.0" % "test",
"com.github.detro.ghostdriver" % "phantomjsdriver" % "1.1.0" % "test")
// == Imports =================================================================================
routesImport ++= List(
"viewModel.Sort",
"extensions.Binders._",
"extensions.Aliases._",
"com.thetestpeople.trt.model._",
"com.thetestpeople.trt.model.jenkins._",
"java.net.URI")
TwirlKeys.templateImports ++= Seq(
"viewModel._",
"com.thetestpeople.trt.model._",
"com.thetestpeople.trt.model.jenkins._",
"java.net.URI",
"com.thetestpeople.trt.analysis._",
"org.apache.commons.lang3.StringEscapeUtils.escapeEcmaScript")
// == Less support ============================================================================
JsEngineKeys.engineType := JsEngineKeys.EngineType.Node
includeFilter in (Assets, LessKeys.less) := "*.less"
excludeFilter in (Assets, LessKeys.less) := "_*.less"
// == Eclipse integration =====================================================================
EclipseKeys.withSource := true
EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Resource + EclipseCreateSrc.Managed
EclipseKeys.eclipseOutput := Some("bin")
// Change resources dir from default for easy integration with Eclipse
resourceDirectory in Test <<= baseDirectory(_ / "testResources")
// == Test settings ===========================================================================
// Override specs2 options
// & Stop problem with tests executing twice because of "JUnitRunner" annotation:
(testOptions in Test) := Seq(Tests.Argument(TestFrameworks.JUnit, "--ignore-runners=org.scalatest.junit.JUnitRunner"))
// Generate HTML report
(testOptions in Test) += Tests.Argument(TestFrameworks.ScalaTest, "-h", "target/report")
// More verbose output
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oDF")
testFrameworks := Seq(TestFrameworks.ScalaTest)
fork in Test := false
// == Debian packaging ========================================================================
packageDescription := "Reporting and analysis of automated test results"
packageSummary := "Test Reporty Thing (trt)"
maintainer := "Matt Russell <[email protected]>"
debianPackageDependencies in Debian ++= Seq("java7-runtime-headless")
linuxPackageMappings in Debian <+= (baseDirectory) map { bd =>
packageMapping(
(bd / "emptyDir") -> "/var/lib/trt"
) withUser "trt" withGroup "trt" withPerms "0755"
}
// == Build info ===============================================================================
buildInfoSettings
sourceGenerators in Compile <+= buildInfo
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion)
buildInfoPackage := "com.thetestpeople.trt.buildKeys"
doc in Compile <<= target.map(_ / "none") // avoid bundling API docs
scriptClasspath := Seq("*") // To avoid long classpath in Windows dist, see https://github.com/sbt/sbt-native-packager/issues/72
// == Misc =====================================================================================
net.virtualvoid.sbt.graph.Plugin.graphSettings
// == Docker ===================================================================================
maintainer in Docker := "Matt Russell <[email protected]>"
dockerExposedPorts in Docker := Seq(9000)
dockerRepository := Some("mattrusselluk")