diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 5f2ef480f8..55c87fcb3a 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -322,7 +322,11 @@ object SparkBuild extends PomBuild { // disable Mima check for all modules, // to be enabled in specific ones that have previous artifacts - MimaKeys.mimaFailOnNoPrevious := false + MimaKeys.mimaFailOnNoPrevious := false, + + // To prevent intermittent compliation failures, see also SPARK-33297 + // Apparently we can remove this when we use JDK 11. + Test / classLoaderLayeringStrategy := ClassLoaderLayeringStrategy.Flat ) def enable(settings: Seq[Setting[_]])(projectRef: ProjectRef) = {