mirror of https://github.com/apache/maven.git
Fix: IT0074. When I removed Maven20xCompatAspect.aj, I removed code that fixed mng-3012. Added the code directly back into DefaultMavenRealmManager.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@694742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2de60dd07b
commit
35cb991844
|
@ -24,6 +24,7 @@ import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
|
||||||
import org.apache.maven.model.Plugin;
|
import org.apache.maven.model.Plugin;
|
||||||
import org.codehaus.plexus.PlexusContainer;
|
import org.codehaus.plexus.PlexusContainer;
|
||||||
import org.codehaus.plexus.PlexusContainerException;
|
import org.codehaus.plexus.PlexusContainerException;
|
||||||
|
import org.codehaus.plexus.util.xml.Xpp3Dom;
|
||||||
import org.codehaus.plexus.classworlds.ClassWorld;
|
import org.codehaus.plexus.classworlds.ClassWorld;
|
||||||
import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
import org.codehaus.plexus.classworlds.realm.ClassRealm;
|
||||||
import org.codehaus.plexus.classworlds.realm.DuplicateRealmException;
|
import org.codehaus.plexus.classworlds.realm.DuplicateRealmException;
|
||||||
|
@ -246,14 +247,27 @@ public class DefaultMavenRealmManager
|
||||||
|
|
||||||
logger.debug( "Retrieving realm for plugin with id: " + id );
|
logger.debug( "Retrieving realm for plugin with id: " + id );
|
||||||
|
|
||||||
|
ClassRealm pluginRealm = null;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return world.getRealm( id );
|
pluginRealm = world.getRealm( id );
|
||||||
|
|
||||||
|
//MNG-3012
|
||||||
|
String parentRealmId = container.getContainerRealm().getId();
|
||||||
|
pluginRealm.importFrom( parentRealmId, Xpp3Dom.class.getName() );
|
||||||
|
pluginRealm.importFrom( parentRealmId, "org.codehaus.plexus.util.xml.pull" );
|
||||||
|
|
||||||
}
|
}
|
||||||
catch ( NoSuchRealmException e )
|
catch ( NoSuchRealmException e )
|
||||||
{
|
{
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
return pluginRealm;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disposePluginRealm( Plugin plugin )
|
public void disposePluginRealm( Plugin plugin )
|
||||||
|
|
Loading…
Reference in New Issue