Skip to content

Commit 70eaaf6

Browse files
committed
DSP-13218 fix assembling
1 parent c96dead commit 70eaaf6

File tree

12 files changed

+19
-10
lines changed

12 files changed

+19
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ run (Java) | `dse spark-submit --class com.datastax.spark.example.WriteRead ta
5151

5252
Task | Command
5353
--------------------|------------
54-
build | `gradle build`
54+
build | `gradle shadowJar`
5555
run (Scala, Java) | `dse spark-submit --class com.datastax.spark.example.WriteRead build/libs/writeRead-0.1-all.jar`
5656

5757
### Maven

java/maven/dse/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@
4444
<groupId>com.datastax.dse</groupId>
4545
<artifactId>dse-java-driver-core</artifactId>
4646
<version>1.2.3</version>
47+
<scope>provided</scope>
4748
</dependency>
4849
<dependency>
4950
<groupId>org.apache.solr</groupId>
5051
<artifactId>solr-solrj</artifactId>
5152
<version>6.0.1</version>
53+
<scope>provided</scope>
5254
</dependency>
5355
</dependencies>
5456

java/sbt/dse/build.sbt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ libraryDependencies ++= Seq(
1919
ExclusionRule("com.datastax.dse", "dse-java-driver-core"),
2020
ExclusionRule("org.apache.solr", "solr-solrj")
2121
),
22-
"com.datastax.dse" % "dse-java-driver-core" % "1.2.3",
23-
"org.apache.solr" % "solr-solrj" % "6.0.1"
22+
"com.datastax.dse" % "dse-java-driver-core" % "1.2.3" % "provided",
23+
"org.apache.solr" % "solr-solrj" % "6.0.1" % "provided"
2424
)
2525

2626
//Your dependencies
@@ -32,6 +32,7 @@ assemblyMergeStrategy in assembly := {
3232
case x => (assemblyMergeStrategy in assembly).value(x)
3333
}
3434

35+
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
3536
//assemblyShadeRules in assembly := Seq(
3637
// ShadeRule.rename("org.apache.commons.csv.**" -> "shaded.org.apache.commons.csv.@1").inAll
3738
//)

java/sbt/dse/project/assembly.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
1+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")

java/sbt/oss/build.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ libraryDependencies ++= Seq(
2424
//libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1"
2525
//libraryDependencies += "org.apache.commons" % "commons-csv" % "1.0"
2626

27+
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
2728
//assemblyShadeRules in assembly := Seq(
2829
// ShadeRule.rename("org.apache.commons.csv.**" -> "shaded.org.apache.commons.csv.@1").inAll
2930
//)

java/sbt/oss/project/assembly.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
1+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")

scala/maven/dse/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@
5858
<groupId>com.datastax.dse</groupId>
5959
<artifactId>dse-java-driver-core</artifactId>
6060
<version>1.2.3</version>
61+
<scope>provided</scope>
6162
</dependency>
6263
<dependency>
6364
<groupId>org.apache.solr</groupId>
6465
<artifactId>solr-solrj</artifactId>
6566
<version>6.0.1</version>
67+
<scope>provided</scope>
6668
</dependency>
6769
<!-- Test Dependencies -->
6870
<dependency>

scala/maven/oss/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<groupId>org.scala-lang</groupId>
2828
<artifactId>scala-library</artifactId>
2929
<version>${scala.version}</version>
30+
<scope>provided</scope>
3031
</dependency>
3132
<dependency>
3233
<groupId>org.apache.spark</groupId>

scala/sbt/dse/build.sbt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ val jUnitVersion = "4.12"
3030
val cassandraVersion = "3.2"
3131

3232
libraryDependencies ++= Seq(
33-
"com.datastax.dse" % "dse-java-driver-core" % "1.2.3",
34-
"org.apache.solr" % "solr-solrj" % "6.0.1",
33+
"com.datastax.dse" % "dse-java-driver-core" % "1.2.3" % "provided",
34+
"org.apache.solr" % "solr-solrj" % "6.0.1" % "provided",
3535
"com.datastax.spark" %% "spark-cassandra-connector-embedded" % connectorVersion % "test",
3636
"org.apache.cassandra" % "cassandra-all" % cassandraVersion % "test",
3737
"org.scalatest" %% "scalatest" % scalaTestVersion % "test",
38-
"junit" % "junit" % "4.12"
38+
"junit" % "junit" % "4.12" % "test"
3939
).map(_.excludeAll(
4040
ExclusionRule("org.slf4j","log4j-over-slf4j"),
4141
ExclusionRule("org.slf4j","slf4j-log4j12"))
@@ -53,6 +53,7 @@ assemblyMergeStrategy in assembly := {
5353
//libraryDependencies += "org.apache.commons" % "commons-math3" % "3.6.1"
5454
//libraryDependencies += "org.apache.commons" % "commons-csv" % "1.0"
5555

56+
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
5657
//assemblyShadeRules in assembly := Seq(
5758
// ShadeRule.rename("org.apache.commons.csv.**" -> "shaded.org.apache.commons.csv.@1").inAll
5859
//)

scala/sbt/dse/project/assembly.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.3")
1+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")

0 commit comments

Comments
 (0)