Revert "MNG-6209 better executeMojo thread context classloader"

This reverts commit ec629f7d51.
This commit is contained in:
Stephen Connolly 2017-10-17 19:18:43 +01:00
parent cae779e4fb
commit 4b95ad9fce
1 changed files with 1 additions and 4 deletions

View File

@ -106,11 +106,8 @@ public void executeMojo( MavenSession session, MojoExecution mojoExecution )
throw new PluginExecutionException( mojoExecution, project, e );
}
// use project realm as thread context classloader to enable components from all extensions=true plugins
ClassRealm tccl = mojoExecution.getPlugin().isExtensions() ? project.getClassRealm() : pluginRealm;
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader( tccl );
Thread.currentThread().setContextClassLoader( pluginRealm );
MavenSession oldSession = legacySupport.getSession();