maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r901751 - in /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven: classrealm/ClassRealmManager.java classrealm/DefaultClassRealmManager.java project/DefaultProjectBuildingHelper.java
Date Thu, 21 Jan 2010 15:54:29 GMT
Author: bentmann
Date: Thu Jan 21 15:54:28 2010
New Revision: 901751

URL: http://svn.apache.org/viewvc?rev=901751&view=rev
Log:
o Refactored code

Modified:
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java?rev=901751&r1=901750&r2=901751&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/ClassRealmManager.java
Thu Jan 21 15:54:28 2010
@@ -36,6 +36,13 @@
 {
 
     /**
+     * Gets the class realm hosting the Maven core.
+     * 
+     * @return The class realm hosting the Maven core, never {@code null}.
+     */
+    ClassRealm getCoreRealm();
+
+    /**
      * Creates a new class realm for the specified project and its build extensions.
      * 
      * @param model The model of the project for which to create a realm, must not be {@code
null}.

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java?rev=901751&r1=901750&r2=901751&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/classrealm/DefaultClassRealmManager.java
Thu Jan 21 15:54:28 2010
@@ -104,7 +104,7 @@
             }
             else
             {
-                classRealm.setParentRealm( container.getContainerRealm() );
+                classRealm.setParentRealm( getCoreRealm() );
                 importMavenApi( classRealm );
             }
 
@@ -141,7 +141,7 @@
      */
     private void importXpp3Dom( ClassRealm importingRealm )
     {
-        ClassRealm coreRealm = container.getContainerRealm();
+        ClassRealm coreRealm = getCoreRealm();
 
         importingRealm.importFrom( coreRealm, "org.codehaus.plexus.util.xml.Xpp3Dom" );
         importingRealm.importFrom( coreRealm, "org.codehaus.plexus.util.xml.pull.XmlPullParser"
);
@@ -185,6 +185,11 @@
         importingRealm.importFromParent( "org.codehaus.plexus.PlexusContainerException" );
     }
 
+    public ClassRealm getCoreRealm()
+    {
+        return container.getContainerRealm();
+    }
+
     public ClassRealm createProjectRealm( Model model )
     {
         if ( model == null )

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java?rev=901751&r1=901750&r2=901751&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuildingHelper.java
Thu Jan 21 15:54:28 2010
@@ -439,7 +439,7 @@
 
         if ( projectRealm == null )
         {
-            projectRealm = container.getContainerRealm();
+            projectRealm = classRealmManager.getCoreRealm();
         }
 
         Thread.currentThread().setContextClassLoader( projectRealm );



Mime
View raw message