mirror of https://github.com/apache/maven.git
Realm fixes
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@497305 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
45b87aa936
commit
8e7dc9ef14
|
@ -615,11 +615,11 @@ public class DefaultPluginManager
|
||||||
// the lifecycle that is part of the lookup. Here we are specifically trying to keep
|
// the lifecycle that is part of the lookup. Here we are specifically trying to keep
|
||||||
// lookups that occur in contextualize calls in line with the right realm.
|
// lookups that occur in contextualize calls in line with the right realm.
|
||||||
|
|
||||||
DefaultPlexusContainer.setLookupRealm( realm );
|
ClassRealm oldRealm = DefaultPlexusContainer.setLookupRealm( realm );
|
||||||
|
|
||||||
plugin = (Mojo) container.lookup( Mojo.ROLE, mojoDescriptor.getRoleHint() );
|
plugin = (Mojo) container.lookup( Mojo.ROLE, mojoDescriptor.getRoleHint() );
|
||||||
|
|
||||||
DefaultPlexusContainer.setLookupRealm( null );
|
DefaultPlexusContainer.setLookupRealm( oldRealm );
|
||||||
|
|
||||||
if ( report && !( plugin instanceof MavenReport ) )
|
if ( report && !( plugin instanceof MavenReport ) )
|
||||||
{
|
{
|
||||||
|
@ -1073,11 +1073,11 @@ public class DefaultPluginManager
|
||||||
if ( StringUtils.isNotEmpty( configuratorId ) )
|
if ( StringUtils.isNotEmpty( configuratorId ) )
|
||||||
{
|
{
|
||||||
configurator =
|
configurator =
|
||||||
(ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE, configuratorId );
|
(ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE, configuratorId, pluginRealm );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE );
|
configurator = (ComponentConfigurator) pluginContainer.lookup( ComponentConfigurator.ROLE, pluginRealm );
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigurationListener listener = new DebugConfigurationListener( getLogger() );
|
ConfigurationListener listener = new DebugConfigurationListener( getLogger() );
|
||||||
|
@ -1209,6 +1209,7 @@ public class DefaultPluginManager
|
||||||
String roleHint )
|
String roleHint )
|
||||||
throws PluginManagerException, ComponentLookupException
|
throws PluginManagerException, ComponentLookupException
|
||||||
{
|
{
|
||||||
|
// XXX this needs the plugin realm!
|
||||||
return container.lookup( role, roleHint );
|
return container.lookup( role, roleHint );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1216,6 +1217,7 @@ public class DefaultPluginManager
|
||||||
String role )
|
String role )
|
||||||
throws ComponentLookupException, PluginManagerException
|
throws ComponentLookupException, PluginManagerException
|
||||||
{
|
{
|
||||||
|
// XXX this needs the plugin realm!
|
||||||
return container.lookupMap( role );
|
return container.lookupMap( role );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue