maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r573436 - in /maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles: build/DefaultProfileAdvisor.java manager/DefaultProfileManager.java manager/ProfileManager.java
Date Fri, 07 Sep 2007 03:47:53 GMT
Author: jvanzyl
Date: Thu Sep  6 20:47:53 2007
New Revision: 573436

URL: http://svn.apache.org/viewvc?rev=573436&view=rev
Log:
o decoupled Settings from the profile manager

Modified:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/DefaultProfileManager.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/ProfileManager.java

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java?rev=573436&r1=573435&r2=573436&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/build/DefaultProfileAdvisor.java
Thu Sep  6 20:47:53 2007
@@ -128,7 +128,7 @@
                                                 List explicitlyInactiveIds )
         throws ProjectBuildingException
     {
-        ProfileManager profileManager = new DefaultProfileManager( container, new Properties()
);
+        ProfileManager profileManager = new DefaultProfileManager( container );
 
         profileManager.explicitlyActivate( explicitlyActiveIds );
         profileManager.explicitlyDeactivate( explicitlyInactiveIds );

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/DefaultProfileManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/DefaultProfileManager.java?rev=573436&r1=573435&r2=573436&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/DefaultProfileManager.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/DefaultProfileManager.java
Thu Sep  6 20:47:53 2007
@@ -23,8 +23,6 @@
 import org.apache.maven.model.Profile;
 import org.apache.maven.profiles.activation.ProfileActivationException;
 import org.apache.maven.profiles.activation.ProfileActivator;
-import org.apache.maven.settings.Settings;
-import org.apache.maven.settings.SettingsUtils;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -55,33 +53,9 @@
      * are passed to maven, possibly containing profile activator properties
      *
      */
-    public DefaultProfileManager( PlexusContainer container, Properties props )
-    {
-        this( container, null, props );
-        
-    }
-
-    /**
-     * @deprecated without passing in the system properties, the SystemPropertiesProfileActivator
will not work correctly
-     * in embedded envirnments.
-     */
-    public DefaultProfileManager( PlexusContainer container, Settings settings )
-    {
-        this.container = container;
-
-        loadSettingsProfiles( settings );
-    }
-    
-    /**
-     * the properties passed to the profile manager are the props that
-     * are passed to maven, possibly containing profile activator properties
-     *
-     */
-    public DefaultProfileManager( PlexusContainer container, Settings settings, Properties
props )
+    public DefaultProfileManager( PlexusContainer container )
     {
         this.container = container;
-
-        loadSettingsProfiles( settings );
     }
     
     public Map getProfilesById()
@@ -307,31 +281,5 @@
     public List getIdsActivatedByDefault()
     {
         return defaultIds;
-    }
-
-    public void loadSettingsProfiles( Settings settings )
-    {
-        if ( settings == null )
-        {
-            return;
-        }
-
-        List settingsProfiles = settings.getProfiles();
-
-        if ( settingsProfiles != null && !settingsProfiles.isEmpty() )
-        {
-            List settingsActiveProfileIds = settings.getActiveProfiles();
-
-            explicitlyActivate( settingsActiveProfileIds );
-
-            for ( Iterator it = settings.getProfiles().iterator(); it.hasNext(); )
-            {
-                org.apache.maven.settings.Profile rawProfile = (org.apache.maven.settings.Profile)
it.next();
-
-                Profile profile = SettingsUtils.convertFromSettingsProfile( rawProfile );
-
-                addProfile( profile );
-            }
-        }
     }
 }

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/ProfileManager.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/ProfileManager.java?rev=573436&r1=573435&r2=573436&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/ProfileManager.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/manager/ProfileManager.java
Thu Sep  6 20:47:53 2007
@@ -51,8 +51,5 @@
 
     List getExplicitlyDeactivatedIds();
 
-    List getIdsActivatedByDefault();
-
-    void loadSettingsProfiles( Settings settings );
-    
+    List getIdsActivatedByDefault();    
 }



Mime
View raw message