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/13 06:21:29 UTC

svn commit: r190344 - /maven/components/trunk/maven-artifact-ant/src/main/resources/META-INF/plexus /maven/components/trunk/maven-core/src/main/java/org/apache/maven /maven/components/trunk/maven-core/src/main/java/org/apache/maven/cli /maven/components/trunk/maven-core/src/main/java/org/apache/maven/model /maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles /maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings /maven/components/trunk/maven-model /maven/components/trunk/maven-profile /maven/components/trunk/maven-profile/src /maven/components/trunk/maven-profile/src/main /maven/components/trunk/maven-profile/src/main/java /maven/components/trunk/maven-profile/src/main/java/org /maven/components/trunk/maven-profile/src/main/java/org/apache /maven/components/trunk/maven-profile/src/main/java/org/apache/maven /maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles /maven/components/trunk/maven-project/src/main/java/org/apache/maven/profile /maven/components/trunk/maven-project/src/main/java/org/apache/maven/profile/activation /maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles /maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation /maven/components/trunk/maven-project/src/main/java/org/apache/maven/project /maven/components/trunk/maven-project/src/main/resources/META-INF/plexus /maven/components/trunk/maven-settings /maven/components/trunk/maven-settings/src /maven/components/trunk/maven-settings/src/main /maven/components/trunk/maven-settings/src/main/java /maven/components/trunk/maven-settings/src/main/java/org /maven/components/trunk/maven-settings/src/main/java/org/apache /maven/components/trunk/maven-settings/src/main/java/org/apache/maven /maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings

Author: jdcasey
Date: Sun Jun 12 21:21:27 2005
New Revision: 190344

URL: http://svn.apache.org/viewcvs?rev=190344&view=rev
Log:
o Added <properties/> for profiles configured in the pom.xml
o Split ModelNormalizationUtils into two utility classes in the maven-profile and maven-settings projects, to be used for converting Profile instances from the settings.xml and profiles.xml into maven-model instances.


Added:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java   (with props)
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java   (with props)
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java   (with props)
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java   (with props)
    maven/components/trunk/maven-profile/src/
    maven/components/trunk/maven-profile/src/main/
    maven/components/trunk/maven-profile/src/main/java/
    maven/components/trunk/maven-profile/src/main/java/org/
    maven/components/trunk/maven-profile/src/main/java/org/apache/
    maven/components/trunk/maven-profile/src/main/java/org/apache/maven/
    maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/
    maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java   (with props)
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/AlwaysOnActivation.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/
      - copied from r190335, maven/components/trunk/maven-project/src/main/java/org/apache/maven/profile/activation/
    maven/components/trunk/maven-settings/src/
    maven/components/trunk/maven-settings/src/main/
    maven/components/trunk/maven-settings/src/main/java/
    maven/components/trunk/maven-settings/src/main/java/org/
    maven/components/trunk/maven-settings/src/main/java/org/apache/
    maven/components/trunk/maven-settings/src/main/java/org/apache/maven/
    maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/
    maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsConversionUtils.java   (with props)
Removed:
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/model/ModelNormalizationUtils.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profile/AlwaysOnActivation.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profile/activation/
Modified:
    maven/components/trunk/maven-artifact-ant/src/main/resources/META-INF/plexus/components.xml
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
    maven/components/trunk/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
    maven/components/trunk/maven-model/maven.mdo
    maven/components/trunk/maven-profile/pom.xml
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/AlwaysOnProfileActivator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ExplicitListingProfileActivator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationCalculator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationUtils.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
    maven/components/trunk/maven-project/src/main/resources/META-INF/plexus/components.xml
    maven/components/trunk/maven-settings/pom.xml

Modified: maven/components/trunk/maven-artifact-ant/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-artifact-ant/src/main/resources/META-INF/plexus/components.xml?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-artifact-ant/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/components/trunk/maven-artifact-ant/src/main/resources/META-INF/plexus/components.xml Sun Jun 12 21:21:27 2005
@@ -226,7 +226,7 @@
           <role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.profile.activation.ProfileActivationCalculator</role>
+          <role>org.apache.maven.profiless.activation.ProfileActivationCalculator</role>
         </requirement>
       </requirements>
     </component>
@@ -236,8 +236,8 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivationCalculator</role>
-      <implementation>org.apache.maven.profile.activation.ProfileActivationCalculator</implementation>
+      <role>org.apache.maven.profiless.activation.ProfileActivationCalculator</role>
+      <implementation>org.apache.maven.profiless.activation.ProfileActivationCalculator</implementation>
     </component>
     <!--
      |
@@ -245,9 +245,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiless.activation.ProfileActivator</role>
       <role-hint>always-on</role-hint>
-      <implementation>org.apache.maven.profile.activation.AlwaysOnProfileActivator</implementation>
+      <implementation>org.apache.maven.profiless.activation.AlwaysOnProfileActivator</implementation>
     </component>
     <!--
      |
@@ -255,9 +255,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiless.activation.ProfileActivator</role>
       <role-hint>jdk-prefix</role-hint>
-      <implementation>org.apache.maven.profile.activation.JdkPrefixProfileActivator</implementation>
+      <implementation>org.apache.maven.profiless.activation.JdkPrefixProfileActivator</implementation>
     </component>
     <!--
      |
@@ -265,9 +265,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiless.activation.ProfileActivator</role>
       <role-hint>system-property</role-hint>
-      <implementation>org.apache.maven.profile.activation.SystemPropertyProfileActivator</implementation>
+      <implementation>org.apache.maven.profiless.activation.SystemPropertyProfileActivator</implementation>
     </component>
     <!--
      |
@@ -275,9 +275,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiless.activation.ProfileActivator</role>
       <role-hint>explicit-listing</role-hint>
-      <implementation>org.apache.maven.profile.activation.ExplicitListingProfileActivator</implementation>
+      <implementation>org.apache.maven.profiless.activation.ExplicitListingProfileActivator</implementation>
     </component>
     <!--
      |

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/DefaultMaven.java Sun Jun 12 21:21:27 2005
@@ -24,13 +24,13 @@
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.lifecycle.LifecycleExecutionException;
 import org.apache.maven.lifecycle.LifecycleExecutor;
-import org.apache.maven.model.ModelNormalizationUtils;
 import org.apache.maven.model.Profile;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.monitor.event.MavenEvents;
 import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.profile.AlwaysOnActivation;
+import org.apache.maven.profiles.AlwaysOnActivation;
 import org.apache.maven.profiles.MavenProfilesBuilder;
+import org.apache.maven.profiles.ProfilesConversionUtils;
 import org.apache.maven.profiles.ProfilesRoot;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.MavenProjectBuilder;
@@ -41,6 +41,7 @@
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Server;
 import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.SettingsConversionUtils;
 import org.apache.maven.usability.ErrorDiagnoser;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
@@ -335,7 +336,7 @@
             {
                 org.apache.maven.settings.Profile rawProfile = (org.apache.maven.settings.Profile) it.next();
                 
-                Profile profile = ModelNormalizationUtils.convertFromSettingsProfile( rawProfile );
+                Profile profile = SettingsConversionUtils.convertFromSettingsProfile( rawProfile );
                 
                 if( settingsActiveProfileIds.contains( rawProfile.getId() ) )
                 {
@@ -358,7 +359,7 @@
                     {
                         org.apache.maven.profiles.Profile rawProfile = (org.apache.maven.profiles.Profile) it.next();
                         
-                        externalProfiles.add( ModelNormalizationUtils.convertFromProfileXmlProfile( rawProfile ) );
+                        externalProfiles.add( ProfilesConversionUtils.convertFromProfileXmlProfile( rawProfile ) );
                     }
                 }
             }

Modified: maven/components/trunk/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java (original)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/cli/MavenCli.java Sun Jun 12 21:21:27 2005
@@ -37,7 +37,7 @@
 import org.apache.maven.monitor.event.DefaultEventMonitor;
 import org.apache.maven.monitor.event.EventDispatcher;
 import org.apache.maven.plugin.Mojo;
-import org.apache.maven.profile.activation.ProfileActivationUtils;
+import org.apache.maven.profiles.activation.ProfileActivationUtils;
 import org.apache.maven.reactor.ReactorException;
 import org.apache.maven.settings.MavenSettingsBuilder;
 import org.apache.maven.settings.Settings;

Added: maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java (added)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,59 @@
+package org.apache.maven.profiles;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.profiles.io.xpp3.ProfilesXpp3Reader;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+
+public class DefaultMavenProfilesBuilder
+    implements MavenProfilesBuilder
+{
+    
+    private static final String PROFILES_XML_FILE = "profiles.xml";
+
+    public ProfilesRoot buildProfiles( File basedir )
+        throws IOException, XmlPullParserException
+    {
+        File profilesXml = new File( basedir, PROFILES_XML_FILE );
+        
+        ProfilesRoot profilesRoot = null;
+        
+        if( profilesXml.exists() )
+        {
+            ProfilesXpp3Reader reader = new ProfilesXpp3Reader();
+            FileReader fileReader = null;
+            try
+            {
+                fileReader = new FileReader( profilesXml );
+                
+                profilesRoot = reader.read( fileReader );
+            }
+            finally
+            {
+                IOUtil.close( fileReader );
+            }
+        }
+        
+        return profilesRoot;
+    }
+
+}

Propchange: maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/DefaultMavenProfilesBuilder.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author"

Added: maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java (added)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,35 @@
+package org.apache.maven.profiles;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.profiles.ProfilesRoot;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * @author jdcasey
+ * @version $Id: MavenProfilesBuilder.java 168292 2005-05-05 07:16:07Z brett $
+ */
+public interface MavenProfilesBuilder
+{
+    String ROLE = MavenProfilesBuilder.class.getName();
+
+    ProfilesRoot buildProfiles( File basedir )
+        throws IOException, XmlPullParserException;
+}

Propchange: maven/components/trunk/maven-core/src/main/java/org/apache/maven/profiles/MavenProfilesBuilder.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author"

Added: maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java (added)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,134 @@
+package org.apache.maven.settings;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.settings.Settings;
+import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
+import org.codehaus.plexus.logging.AbstractLogEnabled;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable;
+import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+
+/**
+ * @author jdcasey
+ * @version $Id: DefaultMavenSettingsBuilder.java 189510 2005-06-08 03:27:43Z jdcasey $
+ */
+public class DefaultMavenSettingsBuilder
+    extends AbstractLogEnabled
+    implements MavenSettingsBuilder, Initializable
+{
+    public static final String userHome = System.getProperty( "user.home" );
+
+    /**
+     * @configuration
+     */
+    private String settingsPath;
+
+    private File settingsFile;
+
+    // ----------------------------------------------------------------------
+    // Component Lifecycle
+    // ----------------------------------------------------------------------
+
+    public void initialize()
+    {
+        settingsFile = getSettingsFile();
+
+        getLogger().debug( "Building Maven settings from: '" + settingsFile.getAbsolutePath() + "'" );
+    }
+
+    // ----------------------------------------------------------------------
+    // MavenProfilesBuilder Implementation
+    // ----------------------------------------------------------------------
+
+    public Settings buildSettings()
+        throws IOException, XmlPullParserException
+    {
+        Settings settings = null;
+
+        if ( settingsFile.exists() && settingsFile.isFile() )
+        {
+            FileReader reader = null;
+            try
+            {
+                reader = new FileReader( settingsFile );
+
+                SettingsXpp3Reader modelReader = new SettingsXpp3Reader();
+
+                settings = modelReader.read( reader );
+            }
+            catch ( FileNotFoundException e )
+            {
+                // Not possible - just ignore
+                getLogger().warn( "Settings file disappeared - ignoring", e );
+            }
+            finally
+            {
+                IOUtil.close( reader );
+            }
+        }
+
+        if ( settings == null )
+        {
+            getLogger().debug( "Settings model not found. Creating empty instance of MavenSettings." );
+
+            settings = new Settings();
+        }
+        
+        if( settings.getLocalRepository() == null || settings.getLocalRepository().length() < 1 )
+        {
+            File mavenUserConfigurationDirectory = new File( userHome, ".m2" );
+            if ( !mavenUserConfigurationDirectory.exists() )
+            {
+                if ( !mavenUserConfigurationDirectory.mkdirs() )
+                {
+                    //throw a configuration exception
+                }
+            }
+
+            String localRepository = new File( mavenUserConfigurationDirectory, "repository" ).getAbsolutePath();
+            
+            settings.setLocalRepository( localRepository );
+        }
+
+        return settings;
+    }
+
+    private File getSettingsFile()
+    {
+        String path = System.getProperty( MavenSettingsBuilder.ALT_SETTINGS_XML_LOCATION );
+        
+        if( StringUtils.isEmpty( path ) )
+        {
+            // TODO: This replacing shouldn't be necessary as user.home should be in the
+            // context of the container and thus the value would be interpolated by Plexus
+            String userHome = System.getProperty( "user.home" );
+
+            return new File( userHome, settingsPath ).getAbsoluteFile();
+        }
+        else
+        {
+            return new File( path ).getAbsoluteFile();
+        }
+    }
+}

Propchange: maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/DefaultMavenSettingsBuilder.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author"

Added: maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java (added)
+++ maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,36 @@
+package org.apache.maven.settings;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.apache.maven.settings.Settings;
+import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+
+import java.io.IOException;
+
+/**
+ * @author jdcasey
+ * @version $Id: MavenSettingsBuilder.java 189510 2005-06-08 03:27:43Z jdcasey $
+ */
+public interface MavenSettingsBuilder
+{
+    String ROLE = MavenSettingsBuilder.class.getName();
+    
+    String ALT_SETTINGS_XML_LOCATION = "org.apache.maven.SettingsXmlFile";
+
+    Settings buildSettings()
+        throws IOException, XmlPullParserException;
+}

Propchange: maven/components/trunk/maven-core/src/main/java/org/apache/maven/settings/MavenSettingsBuilder.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author"

Modified: maven/components/trunk/maven-model/maven.mdo
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-model/maven.mdo?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-model/maven.mdo (original)
+++ maven/components/trunk/maven-model/maven.mdo Sun Jun 12 21:21:27 2005
@@ -2362,6 +2362,18 @@
             <type>BuildBase</type>
           </association>
         </field>
+        <field>
+          <name>properties</name>
+          <version>4.0.0</version>
+          <description><![CDATA[
+             Properties used to fill in plugin configuration when this profile is active
+          ]]></description>
+          <type>Properties</type>
+          <association xml.mapStyle="inline">
+            <type>String</type>
+            <multiplicity>*</multiplicity>
+          </association>
+        </field>
       </fields>
       <codeSegments>
         <codeSegment>
@@ -2370,7 +2382,6 @@
     // We don't want this to be parseable...it's sort of 'hidden'
     // default source for this profile is in the pom itself.
     private String source = "pom";
-    private Properties properties = new Properties();
     
     public void setSource( String source )
     {
@@ -2385,16 +2396,6 @@
     public String toString()
     {
         return "Profile {id: " + getId() + ", source: " + getSource() + "}";
-    }
-    
-    public void setProperties( Properties properties )
-    {
-        this.properties = properties;
-    }
-    
-    public Properties getProperties()
-    {
-        return properties;
     }
           ]]></code>
         </codeSegment>

Modified: maven/components/trunk/maven-profile/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-profile/pom.xml?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-profile/pom.xml (original)
+++ maven/components/trunk/maven-profile/pom.xml Sun Jun 12 21:21:27 2005
@@ -10,8 +10,23 @@
   <dependencies>
     <dependency>
       <groupId>plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-4-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <version>1.0-alpha-2</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+      <version>2.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
   <build>

Added: maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java (added)
+++ maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,108 @@
+package org.apache.maven.profiles;
+
+import org.apache.maven.model.Activation;
+import org.apache.maven.model.ActivationProperty;
+import org.apache.maven.model.Profile;
+import org.apache.maven.model.Repository;
+import org.apache.maven.profiles.AlwaysOnActivation;
+
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class ProfilesConversionUtils
+{
+    
+    private ProfilesConversionUtils()
+    {
+    }
+
+    public static Profile convertFromProfileXmlProfile( org.apache.maven.profiles.Profile profileXmlProfile )
+    {
+        Profile profile = new Profile();
+        
+        profile.setId( profileXmlProfile.getId() );
+        
+        profile.setSource( "profiles.xml" );
+
+        org.apache.maven.profiles.Activation profileActivation = profileXmlProfile.getActivation();
+
+        if ( profileActivation != null )
+        {
+            Activation activation = new Activation();
+
+            activation.setJdk( profileActivation.getJdk() );
+
+            org.apache.maven.profiles.ActivationProperty profileProp = profileActivation.getProperty();
+
+            if ( profileProp != null )
+            {
+                ActivationProperty prop = new ActivationProperty();
+
+                prop.setName( profileProp.getName() );
+                prop.setValue( profileProp.getValue() );
+
+                activation.setProperty( prop );
+            }
+            
+            profile.setActivation( activation );
+        }
+        else
+        {
+            profile.setActivation( new AlwaysOnActivation() );
+        }
+        
+        profile.setProperties( profileXmlProfile.getProperties() );
+
+        List repos = profileXmlProfile.getRepositories();
+        if ( repos != null )
+        {
+            for ( Iterator it = repos.iterator(); it.hasNext(); )
+            {
+                profile
+                    .addRepository( convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) it.next() ) );
+            }
+        }
+
+        List pluginRepos = profileXmlProfile.getPluginRepositories();
+        if ( pluginRepos != null )
+        {
+            for ( Iterator it = pluginRepos.iterator(); it.hasNext(); )
+            {
+                profile.addPluginRepository( convertFromProfileXmlRepository( (org.apache.maven.profiles.Repository) it
+                    .next() ) );
+            }
+        }
+
+        return profile;
+    }
+
+    private static Repository convertFromProfileXmlRepository( org.apache.maven.profiles.Repository profileXmlRepo )
+    {
+        Repository repo = new Repository();
+
+        repo.setId( profileXmlRepo.getId() );
+        repo.setLayout( profileXmlRepo.getLayout() );
+        repo.setName( profileXmlRepo.getName() );
+        repo.setSnapshotPolicy( profileXmlRepo.getSnapshotPolicy() );
+        repo.setUrl( profileXmlRepo.getUrl() );
+
+        return repo;
+    }
+
+}

Propchange: maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author"

Added: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/AlwaysOnActivation.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/AlwaysOnActivation.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/AlwaysOnActivation.java (added)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/AlwaysOnActivation.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,25 @@
+package org.apache.maven.profiles;
+
+import org.apache.maven.model.Activation;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public class AlwaysOnActivation
+    extends Activation
+{
+
+}

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/AlwaysOnProfileActivator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/AlwaysOnProfileActivator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/AlwaysOnProfileActivator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/AlwaysOnProfileActivator.java Sun Jun 12 21:21:27 2005
@@ -1,7 +1,7 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Profile;
-import org.apache.maven.profile.AlwaysOnActivation;
+import org.apache.maven.profiles.AlwaysOnActivation;
 
 /*
  * Copyright 2001-2005 The Apache Software Foundation.

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/DetectedProfileActivator.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Profile;
 

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ExplicitListingProfileActivator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ExplicitListingProfileActivator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ExplicitListingProfileActivator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ExplicitListingProfileActivator.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Profile;
 

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/JdkPrefixProfileActivator.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Activation;
 import org.apache.maven.model.Profile;

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationCalculator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationCalculator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationCalculator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationCalculator.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Activation;
 import org.apache.maven.model.Profile;

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationUtils.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationUtils.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationUtils.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivationUtils.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.codehaus.plexus.util.StringUtils;
 

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/ProfileActivator.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Profile;
 

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java?rev=190344&r1=190335&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/profiles/activation/SystemPropertyProfileActivator.java Sun Jun 12 21:21:27 2005
@@ -1,4 +1,4 @@
-package org.apache.maven.profile.activation;
+package org.apache.maven.profiles.activation;
 
 import org.apache.maven.model.Activation;
 import org.apache.maven.model.ActivationProperty;

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java Sun Jun 12 21:21:27 2005
@@ -33,7 +33,7 @@
 import org.apache.maven.model.Profile;
 import org.apache.maven.model.Repository;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
-import org.apache.maven.profile.activation.ProfileActivationCalculator;
+import org.apache.maven.profiles.activation.ProfileActivationCalculator;
 import org.apache.maven.project.artifact.MavenMetadataSource;
 import org.apache.maven.project.inheritance.ModelInheritanceAssembler;
 import org.apache.maven.project.injection.ModelDefaultsInjector;

Modified: maven/components/trunk/maven-project/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/resources/META-INF/plexus/components.xml?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/components/trunk/maven-project/src/main/resources/META-INF/plexus/components.xml Sun Jun 12 21:21:27 2005
@@ -52,7 +52,7 @@
           <role>org.apache.maven.artifact.repository.ArtifactRepositoryFactory</role>
         </requirement>
         <requirement>
-          <role>org.apache.maven.profile.activation.ProfileActivationCalculator</role>
+          <role>org.apache.maven.profiles.activation.ProfileActivationCalculator</role>
         </requirement>
       </requirements>
     </component>
@@ -62,8 +62,8 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivationCalculator</role>
-      <implementation>org.apache.maven.profile.activation.ProfileActivationCalculator</implementation>
+      <role>org.apache.maven.profiles.activation.ProfileActivationCalculator</role>
+      <implementation>org.apache.maven.profiles.activation.ProfileActivationCalculator</implementation>
     </component>
     <!--
      |
@@ -71,9 +71,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiles.activation.ProfileActivator</role>
       <role-hint>always-on</role-hint>
-      <implementation>org.apache.maven.profile.activation.AlwaysOnProfileActivator</implementation>
+      <implementation>org.apache.maven.profiles.activation.AlwaysOnProfileActivator</implementation>
     </component>
     <!--
      |
@@ -81,9 +81,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiles.activation.ProfileActivator</role>
       <role-hint>jdk-prefix</role-hint>
-      <implementation>org.apache.maven.profile.activation.JdkPrefixProfileActivator</implementation>
+      <implementation>org.apache.maven.profiles.activation.JdkPrefixProfileActivator</implementation>
     </component>
     <!--
      |
@@ -91,9 +91,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiles.activation.ProfileActivator</role>
       <role-hint>system-property</role-hint>
-      <implementation>org.apache.maven.profile.activation.SystemPropertyProfileActivator</implementation>
+      <implementation>org.apache.maven.profiles.activation.SystemPropertyProfileActivator</implementation>
     </component>
     <!--
      |
@@ -101,9 +101,9 @@
      |
      -->
     <component>
-      <role>org.apache.maven.profile.activation.ProfileActivator</role>
+      <role>org.apache.maven.profiles.activation.ProfileActivator</role>
       <role-hint>explicit-listing</role-hint>
-      <implementation>org.apache.maven.profile.activation.ExplicitListingProfileActivator</implementation>
+      <implementation>org.apache.maven.profiles.activation.ExplicitListingProfileActivator</implementation>
     </component>
     <!--
      |

Modified: maven/components/trunk/maven-settings/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-settings/pom.xml?rev=190344&r1=190343&r2=190344&view=diff
==============================================================================
--- maven/components/trunk/maven-settings/pom.xml (original)
+++ maven/components/trunk/maven-settings/pom.xml Sun Jun 12 21:21:27 2005
@@ -10,8 +10,23 @@
   <dependencies>
     <dependency>
       <groupId>plexus</groupId>
+      <artifactId>plexus-container-default</artifactId>
+      <version>1.0-alpha-4-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>plexus</groupId>
       <artifactId>plexus-utils</artifactId>
       <version>1.0-alpha-3</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-model</artifactId>
+      <version>2.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-project</artifactId>
+      <version>2.0-SNAPSHOT</version>
     </dependency>
   </dependencies>
   <build>

Added: maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsConversionUtils.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsConversionUtils.java?rev=190344&view=auto
==============================================================================
--- maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsConversionUtils.java (added)
+++ maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsConversionUtils.java Sun Jun 12 21:21:27 2005
@@ -0,0 +1,97 @@
+package org.apache.maven.settings;
+
+import org.apache.maven.model.Activation;
+import org.apache.maven.model.ActivationProperty;
+import org.apache.maven.model.Profile;
+import org.apache.maven.model.Repository;
+
+import java.util.Iterator;
+import java.util.List;
+
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+public final class SettingsConversionUtils
+{
+
+    public static Profile convertFromSettingsProfile( org.apache.maven.settings.Profile settingsProfile )
+    {
+        Profile profile = new Profile();
+        
+        profile.setId( settingsProfile.getId() );
+        
+        profile.setSource( "settings.xml" );
+
+        org.apache.maven.settings.Activation settingsActivation = settingsProfile.getActivation();
+
+        if ( settingsActivation != null )
+        {
+            Activation activation = new Activation();
+
+            activation.setJdk( settingsActivation.getJdk() );
+
+            org.apache.maven.settings.ActivationProperty settingsProp = settingsActivation.getProperty();
+
+            if ( settingsProp != null )
+            {
+                ActivationProperty prop = new ActivationProperty();
+
+                prop.setName( settingsProp.getName() );
+                prop.setValue( settingsProp.getValue() );
+
+                activation.setProperty( prop );
+            }
+        }
+
+        profile.setProperties( settingsProfile.getProperties() );
+        
+        List repos = settingsProfile.getRepositories();
+        if ( repos != null )
+        {
+            for ( Iterator it = repos.iterator(); it.hasNext(); )
+            {
+                profile
+                    .addRepository( convertFromSettingsRepository( (org.apache.maven.settings.Repository) it.next() ) );
+            }
+        }
+
+        List pluginRepos = settingsProfile.getPluginRepositories();
+        if ( pluginRepos != null )
+        {
+            for ( Iterator it = pluginRepos.iterator(); it.hasNext(); )
+            {
+                profile.addPluginRepository( convertFromSettingsRepository( (org.apache.maven.settings.Repository) it
+                    .next() ) );
+            }
+        }
+
+        return profile;
+    }
+
+    private static Repository convertFromSettingsRepository( org.apache.maven.settings.Repository settingsRepo )
+    {
+        Repository repo = new Repository();
+
+        repo.setId( settingsRepo.getId() );
+        repo.setLayout( settingsRepo.getLayout() );
+        repo.setName( settingsRepo.getName() );
+        repo.setSnapshotPolicy( settingsRepo.getSnapshotPolicy() );
+        repo.setUrl( settingsRepo.getUrl() );
+
+        return repo;
+    }
+
+}

Propchange: maven/components/trunk/maven-settings/src/main/java/org/apache/maven/settings/SettingsConversionUtils.java
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author"



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