Merge pull request #3744 from cunei/wip-port-zinc-pr-441

Port of sbt/zinc#441 to sbt/sbt 1.0.x
This commit is contained in:
Dale Wijnand 2017-11-16 16:29:15 +00:00 committed by GitHub
commit 17762947e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -108,6 +108,8 @@ object Scripted {
prescripted: File => Unit,
launchOpts: Seq[String]): 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.test.ScriptedRunner", true, loader)