Skip to content

Commit

Permalink
Remove compile-scoped junit dependency.
Browse files Browse the repository at this point in the history
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 <vanzin@cloudera.com>

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.
  • Loading branch information
Marcelo Vanzin authored and pwendell committed Jun 5, 2014
1 parent 5473aa7 commit 668cb1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions mllib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@
<groupId>org.scalanlp</groupId>
<artifactId>breeze_${scala.binary.version}</artifactId>
<version>0.7</version>
<exclusions>
<!-- This is included as a compile-scoped dependency by jtransforms, which is
a dependency of breeze. -->
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
Expand Down
3 changes: 2 additions & 1 deletion project/SparkBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ object SparkBuild extends Build {
val excludeJruby = ExclusionRule(organization = "org.jruby")
val excludeThrift = ExclusionRule(organization = "org.apache.thrift")
val excludeServletApi = ExclusionRule(organization = "javax.servlet", artifact = "servlet-api")
val excludeJUnit = ExclusionRule(organization = "junit")

def sparkPreviousArtifact(id: String, organization: String = "org.apache.spark",
version: String = "1.0.0", crossVersion: String = "2.10"): Option[sbt.ModuleID] = {
Expand Down Expand Up @@ -466,7 +467,7 @@ object SparkBuild extends Build {
previousArtifact := sparkPreviousArtifact("spark-mllib"),
libraryDependencies ++= Seq(
"org.jblas" % "jblas" % jblasVersion,
"org.scalanlp" %% "breeze" % "0.7"
"org.scalanlp" %% "breeze" % "0.7" excludeAll(excludeJUnit)
)
)

Expand Down

0 comments on commit 668cb1d

Please sign in to comment.