forked from jparkie/Spark2Cassandra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
118 lines (100 loc) · 3.39 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
import com.typesafe.sbt.SbtScalariform
import com.typesafe.sbt.SbtScalariform._
import scalariform.formatter.preferences._
/**
* Organization:
*/
organization := "com.github.jparkie"
organizationName := "jparkie"
/**
* Library Meta:
*/
name := "Spark2Cassandra"
licenses := Seq(("Apache License, Version 2.0", url("http://www.apache.org/licenses/LICENSE-2.0")))
/**
* Scala:
*/
scalaVersion := "2.10.6"
crossScalaVersions := Seq("2.10.6", "2.11.7")
/**
* Library Dependencies:
*/
// Versions:
val SparkVersion = "1.5.2"
val SparkTestVersion = "1.5.2_0.3.0"
val ScalaTestVersion = "2.2.4"
val SparkCassandraConnectorVersion = "1.5.0"
val CassandraAllVersion = "2.1.13"
val CassandraUnitVersion = "2.1.9.2"
// Dependencies:
val sparkCore = "org.apache.spark" %% "spark-core" % SparkVersion % "provided"
val sparkSql = "org.apache.spark" %% "spark-sql" % SparkVersion % "provided"
val sparkTest = "com.holdenkarau" %% "spark-testing-base" % SparkTestVersion % "test"
val scalaTest = "org.scalatest" %% "scalatest" % ScalaTestVersion % "test"
val ssc = "com.datastax.spark" %% "spark-cassandra-connector" % SparkCassandraConnectorVersion
val cassandraAll = "org.apache.cassandra" % "cassandra-all" % CassandraAllVersion
val cassandraClient = "org.apache.cassandra" % "cassandra-clientutil" % CassandraAllVersion
val cassandraUnit = "org.cassandraunit" % "cassandra-unit" % CassandraUnitVersion % "test"
libraryDependencies ++= Seq(sparkCore, sparkSql, sparkTest, scalaTest, ssc, cassandraAll, cassandraUnit)
// Force cassandraUnit and ssc to utilize cassandraAll, cassandraClient.
dependencyOverrides ++= Set(cassandraAll, cassandraClient)
/**
* Tests:
*/
parallelExecution in Test := false
/**
* Scalariform:
*/
SbtScalariform.scalariformSettings
ScalariformKeys.preferences := FormattingPreferences()
.setPreference(RewriteArrowSymbols, false)
.setPreference(AlignParameters, true)
.setPreference(AlignSingleLineCaseStatements, true)
.setPreference(SpacesAroundMultiImports, true)
/**
* Scoverage:
*/
coverageEnabled in Test := true
/**
* Publishing to Sonatype:
*/
publishMavenStyle := true
publishArtifact in Test := false
publishTo := {
val nexus = "https://oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
}
pomExtra := {
<url>https://github.com/jparkie/Spark2Cassandra</url>
<scm>
<url>[email protected]:jparkie/Spark2Cassandra.git</url>
<connection>scm:git:[email protected]:jparkie/Spark2Cassandra.git</connection>
</scm>
<developers>
<developer>
<id>jparkie</id>
<name>Jacob Park</name>
<url>https://github.com/jparkie</url>
</developer>
</developers>
}
/**
* Release:
*/
import ReleaseTransformations._
releasePublishArtifactsAction := PgpKeys.publishSigned.value
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
setNextVersion,
commitNextVersion,
pushChanges
)