You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by jd...@apache.org on 2005/06/16 03:50:29 UTC

svn commit: r190854 [2/2] - in /maven/components/trunk: ./ maven-artifact/src/main/java/org/apache/maven/artifact/handler/ maven-core-it-verifier/src/main/java/org/apache/maven/it/ maven-core-it/ maven-core/ maven-core/src/main/java/org/apache/maven/cli/ maven-core/src/main/java/org/apache/maven/lifecycle/ maven-core/src/main/java/org/apache/maven/plugin/ maven-core/src/main/java/org/apache/maven/plugin/version/ maven-core/src/main/resources/META-INF/plexus/ maven-mboot2/src/main/java/ maven-plugin-registry/ maven-plugin-registry/src/ maven-plugin-registry/src/main/ maven-plugin-registry/src/main/java/ maven-plugin-registry/src/main/java/org/ maven-plugin-registry/src/main/java/org/apache/ maven-plugin-registry/src/main/java/org/apache/maven/ maven-plugin-registry/src/main/java/org/apache/maven/plugin/ maven-plugin-registry/src/main/java/org/apache/maven/plugin/registry/ maven-plugin-registry/src/main/resources/ maven-plugin-registry/src/main/resources/META-INF/ maven-plugin-registry/src/main/resources/META-INF/plexus/ maven-plugins/maven-release-plugin/src/main/java/org/apache/maven/plugin/release/ maven-plugins/maven-site-plugin/src/main/java/org/apache/maven/doxia/ maven-settings/ maven-settings/src/main/java/org/apache/maven/settings/ maven-settings/src/main/resources/META-INF/plexus/

Modified: maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java?rev=190854&r1=190853&r2=190854&view=diff
==============================================================================
--- maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java (original)
+++ maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsUtils.java Wed Jun 15 18:50:28 2005
@@ -28,15 +28,16 @@
 
     private SettingsUtils()
     {
+        // don't allow construction.
     }
-    
+
     public static void merge( Settings dominant, Settings recessive, String recessiveSourceLevel )
     {
         if ( dominant == null || recessive == null )
         {
             return;
         }
-        
+
         recessive.setSourceLevel( recessiveSourceLevel );
 
         List dominantActiveProfiles = dominant.getActiveProfiles();
@@ -49,7 +50,7 @@
             if ( !dominantActiveProfiles.contains( profileId ) )
             {
                 dominantActiveProfiles.add( profileId );
-                
+
                 dominant.setActiveProfileSourceLevel( profileId, recessiveSourceLevel );
             }
         }
@@ -57,7 +58,7 @@
         if ( StringUtils.isEmpty( dominant.getLocalRepository() ) )
         {
             dominant.setLocalRepository( recessive.getLocalRepository() );
-            
+
             dominant.setLocalRepositorySourceLevel( recessiveSourceLevel );
         }
 
@@ -66,58 +67,36 @@
         shallowMergeById( dominant.getProxies(), recessive.getProxies(), recessiveSourceLevel );
         shallowMergeById( dominant.getProfiles(), recessive.getProfiles(), recessiveSourceLevel );
 
-        shallowMergePluginUpdates( dominant, recessive.getPluginUpdates(), recessiveSourceLevel );
-    }
-    
-    private static void shallowMergePluginUpdates( Settings dominant, List recessive, String recessiveSourceLevel )
-    {
-        Map dominantByKey = dominant.getPluginUpdatesByKey();
-        
-        List dominantPluginUpdates = dominant.getPluginUpdates();
-        
-        for ( Iterator it = recessive.iterator(); it.hasNext(); )
-        {
-            PluginUpdate recessivePluginUpdate = (PluginUpdate) it.next();
-            
-            if( !dominantByKey.containsKey( recessivePluginUpdate.getKey() ) )
-            {
-                recessivePluginUpdate.setSourceLevel( recessiveSourceLevel );
-                
-                dominantPluginUpdates.add( recessivePluginUpdate );
-            }
-        }
-        
-        dominant.flushPluginUpdatesByKey();
     }
 
     private static void shallowMergeById( List dominant, List recessive, String recessiveSourceLevel )
     {
         Map dominantById = mapById( dominant );
-        
+
         for ( Iterator it = recessive.iterator(); it.hasNext(); )
         {
             IdentifiableBase identifiable = (IdentifiableBase) it.next();
-            
-            if( !dominantById.containsKey(identifiable.getId()))
+
+            if ( !dominantById.containsKey( identifiable.getId() ) )
             {
                 identifiable.setSourceLevel( recessiveSourceLevel );
-                
+
                 dominant.add( identifiable );
             }
         }
     }
-    
+
     private static Map mapById( List identifiables )
     {
         Map byId = new HashMap();
-        
+
         for ( Iterator it = identifiables.iterator(); it.hasNext(); )
         {
             IdentifiableBase identifiable = (IdentifiableBase) it.next();
-            
+
             byId.put( identifiable.getId(), identifiable );
         }
-        
+
         return byId;
     }
 

Modified: maven/components/trunk/maven-settings/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-settings/src/main/resources/META-INF/plexus/components.xml?rev=190854&r1=190853&r2=190854&view=diff
==============================================================================
--- maven/components/trunk/maven-settings/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/components/trunk/maven-settings/src/main/resources/META-INF/plexus/components.xml Wed Jun 15 18:50:28 2005
@@ -5,7 +5,7 @@
       <role>org.apache.maven.settings.MavenSettingsBuilder</role>
       <implementation>org.apache.maven.settings.DefaultMavenSettingsBuilder</implementation>
       <configuration>
-        <globalSettingsPath>${maven.home}/settings.xml</globalSettingsPath>
+        <globalSettingsPath>${maven.home}/conf/settings.xml</globalSettingsPath>
         <userSettingsPath>${user.home}/.m2/settings.xml</userSettingsPath>
       </configuration>
     </component>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org