Skip to content

Commit

Permalink
Fix #436: Remove annoying log4j scripted exception
Browse files Browse the repository at this point in the history
  • Loading branch information
jvican committed Oct 22, 2017
1 parent aa1a628 commit 045f194
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions project/Scripted.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 045f194

Please sign in to comment.