Set the proper default lookup realm for mojo execution - they may lookup components when executing too

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@497307 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kenney Westerhof 2007-01-18 05:28:02 +00:00
parent 8e7dc9ef14
commit c783818ab2
1 changed files with 4 additions and 1 deletions

View File

@ -513,7 +513,6 @@ public class DefaultPluginManager
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
ClassRealm pluginRealm = pluginDescriptor.getClassRealm();
;
try
{
@ -521,8 +520,12 @@ public class DefaultPluginManager
Thread.currentThread().setContextClassLoader( pluginRealm );
ClassRealm oldRealm = DefaultPlexusContainer.setLookupRealm( pluginRealm );
plugin.execute();
DefaultPlexusContainer.setLookupRealm( oldRealm );
dispatcher.dispatchEnd( event, goalExecId );
}
catch ( MojoExecutionException e )