maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r757126 - /maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
Date Sun, 22 Mar 2009 03:42:52 GMT
Author: jvanzyl
Date: Sun Mar 22 03:42:51 2009
New Revision: 757126

URL: http://svn.apache.org/viewvc?rev=757126&view=rev
Log:
o no attempt should even be made to load a plugin descriptor again if for that gav it's been
loaded, the plugin collector has the descriptor
  as found in the plugin JAR and after first processing the artifacts and realm is created
so nothing else needs to be done for the base, set
  if plugin specific dependencies in the plugin are specified in a given project we'll wrap
those, not recreate everything over again

Modified:
    maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java

Modified: maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java?rev=757126&r1=757125&r2=757126&view=diff
==============================================================================
--- maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
(original)
+++ maven/components/branches/MNG-2766/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
Sun Mar 22 03:42:51 2009
@@ -152,10 +152,17 @@
     {
         return getByPrefix( prefix, session.getPluginGroups(), project.getRemoteArtifactRepositories(),
session.getLocalRepository() );
     }
-
+    
     public PluginDescriptor loadPlugin( Plugin plugin, MavenProject project, MavenSession
session )
         throws PluginLoaderException
     {        
+        PluginDescriptor pluginDescriptor = pluginCollector.getPluginDescriptor( plugin );
+                
+        if ( pluginDescriptor != null )
+        {
+            return pluginDescriptor;
+        }
+                
         try
         {            
             String pluginVersion = plugin.getVersion();
@@ -175,11 +182,12 @@
                          
             addPlugin( plugin, project, session );
             
-            PluginDescriptor result = pluginCollector.getPluginDescriptor( plugin );
+            // This does not appear to be caching anything really.
+            pluginDescriptor = pluginCollector.getPluginDescriptor( plugin );
                         
             project.addPlugin( plugin );
-
-            return result;
+            
+            return pluginDescriptor;
         }
         catch ( ArtifactResolutionException e )
         {
@@ -279,9 +287,7 @@
                     // Not going to happen
                 }
             }
-             
-            pluginRealm.display();
-            
+                         
             try
             {
                 logger.debug( "Discovering components in realm: " + pluginRealm );



Mime
View raw message