Skip to content

Commit 668cb1d

Browse files
Marcelo Vanzinpwendell
authored andcommitted
Remove compile-scoped junit dependency.
This avoids having junit classes showing up in the assembly jar. I verified that only test classes in the jtransforms package use junit. Author: Marcelo Vanzin <[email protected]> Closes #794 from vanzin/junit-dep-exclusion and squashes the following commits: 274e1c2 [Marcelo Vanzin] Remove junit from assembly in sbt build also. ad950be [Marcelo Vanzin] Remove compile-scoped junit dependency.
1 parent 5473aa7 commit 668cb1d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

mllib/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@
5050
<groupId>org.scalanlp</groupId>
5151
<artifactId>breeze_${scala.binary.version}</artifactId>
5252
<version>0.7</version>
53+
<exclusions>
54+
<!-- This is included as a compile-scoped dependency by jtransforms, which is
55+
a dependency of breeze. -->
56+
<exclusion>
57+
<groupId>junit</groupId>
58+
<artifactId>junit</artifactId>
59+
</exclusion>
60+
</exclusions>
5361
</dependency>
5462
<dependency>
5563
<groupId>org.scalatest</groupId>

project/SparkBuild.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ object SparkBuild extends Build {
322322
val excludeJruby = ExclusionRule(organization = "org.jruby")
323323
val excludeThrift = ExclusionRule(organization = "org.apache.thrift")
324324
val excludeServletApi = ExclusionRule(organization = "javax.servlet", artifact = "servlet-api")
325+
val excludeJUnit = ExclusionRule(organization = "junit")
325326

326327
def sparkPreviousArtifact(id: String, organization: String = "org.apache.spark",
327328
version: String = "1.0.0", crossVersion: String = "2.10"): Option[sbt.ModuleID] = {
@@ -466,7 +467,7 @@ object SparkBuild extends Build {
466467
previousArtifact := sparkPreviousArtifact("spark-mllib"),
467468
libraryDependencies ++= Seq(
468469
"org.jblas" % "jblas" % jblasVersion,
469-
"org.scalanlp" %% "breeze" % "0.7"
470+
"org.scalanlp" %% "breeze" % "0.7" excludeAll(excludeJUnit)
470471
)
471472
)
472473

0 commit comments

Comments
 (0)