maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sisb...@apache.org
Subject svn commit: r694742 - /maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/DefaultMavenRealmManager.java
Date Fri, 12 Sep 2008 17:04:32 GMT
Author: sisbell
Date: Fri Sep 12 10:04:32 2008
New Revision: 694742

URL: http://svn.apache.org/viewvc?rev=694742&view=rev
Log:
Fix: IT0074. When I removed Maven20xCompatAspect.aj, I removed code that fixed mng-3012. Added
the code directly back into DefaultMavenRealmManager.

Modified:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/DefaultMavenRealmManager.java

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/DefaultMavenRealmManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/DefaultMavenRealmManager.java?rev=694742&r1=694741&r2=694742&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/DefaultMavenRealmManager.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/realm/DefaultMavenRealmManager.java
Fri Sep 12 10:04:32 2008
@@ -24,6 +24,7 @@
 import org.apache.maven.model.Plugin;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.PlexusContainerException;
+import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.classworlds.ClassWorld;
 import org.codehaus.plexus.classworlds.realm.ClassRealm;
 import org.codehaus.plexus.classworlds.realm.DuplicateRealmException;
@@ -246,14 +247,27 @@
 
         logger.debug( "Retrieving realm for plugin with id: " + id );
 
+        ClassRealm pluginRealm = null;
+
         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 )
         {
-            return null;
+
         }
+        finally
+        {
+            return pluginRealm;
+        }
+
     }
 
     public void disposePluginRealm( Plugin plugin )



Mime
View raw message