Skip to content

Commit

Permalink
Revert "MNG-6209 better executeMojo thread context classloader"
Browse files Browse the repository at this point in the history
This reverts commit ec629f7.
  • Loading branch information
stephenc committed Oct 17, 2017
1 parent cae779e commit 4b95ad9
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 4b95ad9

Please sign in to comment.