From 045f19415c5516de5fd7d5da3e571177ef51c780 Mon Sep 17 00:00:00 2001 From: jvican Date: Sun, 22 Oct 2017 16:15:40 +0200 Subject: [PATCH] Fix #436: Remove annoying log4j scripted exception --- project/Scripted.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/project/Scripted.scala b/project/Scripted.scala index a2df1d7bc6..d018b64b69 100644 --- a/project/Scripted.scala +++ b/project/Scripted.scala @@ -75,6 +75,8 @@ object Scripted { bufferLog: Boolean, prescripted: File => Unit): Unit = { System.err.println(s"About to run tests: ${args.mkString("\n * ", "\n * ", "\n")}") + // Force Log4J to not use a thread context classloader otherwise it throws a CCE + sys.props(org.apache.logging.log4j.util.LoaderUtil.IGNORE_TCCL_PROPERTY) = "true" val noJLine = new classpath.FilteredLoader(scriptedSbtInstance.loader, "jline." :: Nil) val loader = classpath.ClasspathUtilities.toLoader(scriptedSbtClasspath.files, noJLine) val bridgeClass = Class.forName("sbt.internal.inc.IncScriptedRunner", true, loader)