Skip to content

Commit

Permalink
move log4j2 implementation needed for running spark >=3.3.0 into scop…
Browse files Browse the repository at this point in the history
…e test. Remove slf4j dependency as it is not used.
  • Loading branch information
zkull authored and nightscape committed Dec 20, 2022
1 parent 4c336b9 commit 9d26e6a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SparkModule(_scalaVersion: String, sparkVersion: String) extends SbtModule

val poiVersion = "5.2.3"
override def ivyDeps = {
val base = Agg(
Agg(
ivy"org.apache.poi:poi:$poiVersion",
ivy"org.apache.poi:poi-ooxml:$poiVersion",
ivy"org.apache.poi:poi-ooxml-lite:$poiVersion",
Expand All @@ -70,19 +70,13 @@ class SparkModule(_scalaVersion: String, sparkVersion: String) extends SbtModule
ivy"com.github.pjfanning:poi-shared-strings:2.5.6",
ivy"commons-io:commons-io:2.11.0",
ivy"org.apache.commons:commons-compress:1.22",
ivy"org.apache.logging.log4j:log4j-api:2.19.0",
ivy"com.zaxxer:SparseBitSet:1.2",
ivy"org.apache.commons:commons-collections4:4.4",
ivy"com.github.virtuald:curvesapi:1.07",
ivy"commons-codec:commons-codec:1.15",
ivy"org.apache.commons:commons-math3:3.6.1",
ivy"org.scala-lang.modules::scala-collection-compat:2.9.0"
)
if (sparkVersion >= "3.3.0") {
base ++ Agg(ivy"org.apache.logging.log4j:log4j-core:2.19.0")
} else {
base
}
}
object test extends Tests with SbtModule with TestModule.ScalaTest {

Expand All @@ -100,8 +94,8 @@ class SparkModule(_scalaVersion: String, sparkVersion: String) extends SbtModule
ivy"org.scalacheck::scalacheck:1.17.0",
ivy"com.github.alexarchambault::scalacheck-shapeless_1.15:1.3.0",
ivy"com.github.mrpowers::spark-fast-tests:1.3.0",
ivy"org.scalamock::scalamock:5.2.0"
)
ivy"org.scalamock::scalamock:5.2.0",
) ++ (if (sparkVersion >= "3.3.0") Agg(ivy"org.apache.logging.log4j:log4j-core:2.19.0") else Agg()) // Spark 3.3 doesnt run without a Log4j2 implementation
}
}

Expand Down

0 comments on commit 9d26e6a

Please sign in to comment.