mirror of https://github.com/apache/maven.git
o adding some patches for changes in plexus
submitted by: Dain Sundstrom git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@718845 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f88b524249
commit
17d68dbce5
|
@ -813,6 +813,11 @@ public class DefaultPluginManager
|
|||
// lookups that occur in contextualize calls in line with the right realm.
|
||||
container.setLookupRealm( pluginRealm );
|
||||
|
||||
ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
Thread.currentThread().setContextClassLoader( pluginRealm );
|
||||
try
|
||||
{
|
||||
|
||||
getLogger().debug(
|
||||
"Looking up mojo " + mojoDescriptor.getRoleHint() + " in realm "
|
||||
+ pluginRealm.getId() + " - descRealmId="
|
||||
|
@ -900,6 +905,10 @@ public class DefaultPluginManager
|
|||
populatePluginFields( mojo, mojoDescriptor, extractedMojoConfiguration, expressionEvaluator );
|
||||
|
||||
return mojo;
|
||||
|
||||
} finally {
|
||||
Thread.currentThread().setContextClassLoader( oldClassLoader );
|
||||
}
|
||||
}
|
||||
|
||||
private void checkDeprecatedParameters( MojoDescriptor mojoDescriptor,
|
||||
|
|
|
@ -66,7 +66,7 @@ public class TestComponentOverride
|
|||
public void testComponentOverride()
|
||||
throws ComponentLookupException
|
||||
{
|
||||
ArtifactFactory factory = (ArtifactFactory) container.lookup( ArtifactFactory.class );
|
||||
ArtifactFactory factory = container.lookup( ArtifactFactory.class );
|
||||
|
||||
assertNotNull( factory );
|
||||
|
||||
|
|
Loading…
Reference in New Issue