mirror of https://github.com/apache/maven.git
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@773470 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4446b8dba7
commit
4a046065c4
|
@ -12,12 +12,12 @@ public class DefaultPluginClassLoaderCache
|
|||
{
|
||||
private Map<String,ClassRealm> pluginClassLoaders = new HashMap<String,ClassRealm>();
|
||||
|
||||
public void cachePluginClassLoader( String key, ClassRealm pluginClassLoader )
|
||||
public void put( String key, ClassRealm pluginClassLoader )
|
||||
{
|
||||
pluginClassLoaders.put( key, pluginClassLoader );
|
||||
}
|
||||
|
||||
public ClassRealm getPluginClassLoader( String key )
|
||||
public ClassRealm get( String key )
|
||||
{
|
||||
return pluginClassLoaders.get( key );
|
||||
}
|
||||
|
|
|
@ -198,7 +198,7 @@ public class DefaultPluginManager
|
|||
}
|
||||
}
|
||||
|
||||
//pluginRealm.display();
|
||||
pluginRealm.display();
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -215,7 +215,7 @@ public class DefaultPluginManager
|
|||
throw new PluginContainerException( plugin, pluginRealm, "Error scanning plugin realm for components.", e );
|
||||
}
|
||||
|
||||
pluginClassLoaderCache.cachePluginClassLoader( constructPluginKey( plugin ), pluginRealm );
|
||||
pluginClassLoaderCache.put( constructPluginKey( plugin ), pluginRealm );
|
||||
|
||||
PluginDescriptor pluginDescriptor = getPluginDescriptor( plugin );
|
||||
|
||||
|
@ -345,7 +345,7 @@ public class DefaultPluginManager
|
|||
mojo = getConfiguredMojo( session, mojoExecution, project, false, mojoExecution );
|
||||
|
||||
//pluginRealm = pluginDescriptor.getClassRealm();
|
||||
pluginRealm = pluginClassLoaderCache.getPluginClassLoader( constructPluginKey( mojoDescriptor.getPluginDescriptor() ) );
|
||||
pluginRealm = pluginClassLoaderCache.get( constructPluginKey( mojoDescriptor.getPluginDescriptor() ) );
|
||||
|
||||
Thread.currentThread().setContextClassLoader( pluginRealm );
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
|||
*/
|
||||
public interface PluginClassLoaderCache
|
||||
{
|
||||
void cachePluginClassLoader( String key, ClassRealm pluginClassLoader );
|
||||
void put( String key, ClassRealm pluginClassLoader );
|
||||
|
||||
ClassRealm getPluginClassLoader( String key );
|
||||
ClassRealm get( String key );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue