Skip to content

Commit 1901355

Browse files
committed
DSP-12329 exclude C* from dse-spark-dependencies
It must be added back for tests. There is an exclude needed on dse-spark-dependencies because older versions of this artifact have C* and we want to avoid conflicts. This exclude will be removed soon (when version per branch is introduced)
1 parent d154657 commit 1901355

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

scala/gradle/dse/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,22 @@ def dseVersion = "5.0.4"
3333
def scalaVersion = "2.10"
3434
def scalaTestVersion = "3.0.0"
3535
def connectorVersion = "1.6.0"
36+
def cassandraVersion = "3.0.2"
3637
def jUnitVersion = "4.12"
3738

3839
// Please make sure that following DSE version matches your DSE cluster version.
3940
dependencies {
40-
provided "com.datastax.dse:dse-spark-dependencies:$dseVersion" exclude group: 'org.slf4j', module: 'slf4j-log4j12'
41+
provided("com.datastax.dse:dse-spark-dependencies:$dseVersion") {
42+
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
43+
exclude group: 'org.apache.cassandra'
44+
}
4145
// assembly "org.apache.commons:commons-math3:3.6.1"
4246
// assembly "org.apache.commons:commons-csv:1.0"
4347

44-
//Test Dependencies
48+
// Test Dependencies
4549
testCompile "com.datastax.spark:spark-cassandra-connector-embedded_$scalaVersion:$connectorVersion"
4650
testCompile "org.scalatest:scalatest_$scalaVersion:$scalaTestVersion"
51+
testCompile "org.apache.cassandra:cassandra-all:$cassandraVersion"
4752
testCompile "junit:junit:$jUnitVersion"
4853
}
4954

scala/maven/dse/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<scala.main.version>2.10</scala.main.version>
1515
<scalatest.version>3.0.0</scalatest.version>
1616
<connector.version>1.6.0</connector.version>
17+
<cassandra.version>3.0.2</cassandra.version>
1718
<junit.version>4.12</junit.version>
1819
</properties>
1920

@@ -32,6 +33,10 @@
3233
<groupId>javax.servlet</groupId>
3334
<artifactId>*</artifactId>
3435
</exclusion>
36+
<exclusion>
37+
<groupId>org.apache.cassandra</groupId>
38+
<artifactId>*</artifactId>
39+
</exclusion>
3540
</exclusions>
3641
</dependency>
3742
<!-- Your dependencies, 'provided' are not included in jar -->
@@ -65,6 +70,12 @@
6570
<version>${junit.version}</version>
6671
<scope>test</scope>
6772
</dependency>
73+
<dependency>
74+
<groupId>org.apache.cassandra</groupId>
75+
<artifactId>cassandra-all</artifactId>
76+
<version>${cassandra.version}</version>
77+
<scope>test</scope>
78+
</dependency>
6879
</dependencies>
6980

7081
<repositories>

scala/sbt/dse/build.sbt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,22 @@ libraryDependencies += (
1616
"com.datastax.dse" % "dse-spark-dependencies" % dseVersion % "provided" excludeAll (
1717
ExclusionRule("org.slf4j","slf4j-log4j12"),
1818
ExclusionRule("org.mortbay.jetty"),
19-
ExclusionRule("javax.servlet")
19+
ExclusionRule("javax.servlet"),
20+
ExclusionRule("org.apache.cassandra")
2021
)
2122
)
2223

2324
// Test Dependencies
24-
//The 'test/resources' Directory in should match the resources directory in the `it` directory
25-
//for the version of the Spark Cassandra Connector in use.
25+
// The 'test/resources' Directory in should match the resources directory in the `it` directory
26+
// for the version of the Spark Cassandra Connector in use.
2627
val scalaTestVersion = "3.0.0"
2728
val connectorVersion = "1.6.0"
2829
val jUnitVersion = "4.12"
30+
val cassandraVersion = "3.0.2"
2931

3032
libraryDependencies ++= Seq(
3133
"com.datastax.spark" %% "spark-cassandra-connector-embedded" % connectorVersion % "test",
34+
"org.apache.cassandra" % "cassandra-all" % cassandraVersion % "test",
3235
"org.scalatest" %% "scalatest" % scalaTestVersion % "test",
3336
"junit" % "junit" % "4.12"
3437

0 commit comments

Comments
 (0)