diff --git a/main/src/main/scala/sbt/ScriptedPlugin.scala b/main/src/main/scala/sbt/ScriptedPlugin.scala index d871b78b6..6cf69a922 100644 --- a/main/src/main/scala/sbt/ScriptedPlugin.scala +++ b/main/src/main/scala/sbt/ScriptedPlugin.scala @@ -26,6 +26,10 @@ import Keys._ import Project._ object ScriptedPlugin extends AutoPlugin { + + // 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" + object autoImport { val ScriptedConf = Configurations.config("scripted-sbt") hide val ScriptedLaunchConf = Configurations.config("scripted-sbt-launch") hide