You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by br...@apache.org on 2005/07/25 11:51:57 UTC

svn commit: r224707 [2/2] - in /maven/components/trunk: ./ maven-artifact-ant/src/main/java/org/apache/maven/artifact/ant/ maven-artifact-manager/src/main/java/org/apache/maven/artifact/deployer/ maven-artifact-manager/src/main/java/org/apache/maven/ar...

Modified: maven/components/trunk/maven-plugins/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/pom.xml?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/pom.xml (original)
+++ maven/components/trunk/maven-plugins/pom.xml Mon Jul 25 02:51:12 2005
@@ -71,6 +71,11 @@
     <url>http://www.apache.org/</url>
   </organization>
   <distributionManagement>
+    <snapshotRepository>
+      <id>central-plugins-snapshots</id>
+      <name>Maven Central Plugins Development Repository</name>
+      <url>scp://repo1.maven.org/home/projects/maven/repository-staging/snapshots/maven2/plugins</url>
+    </snapshotRepository>
     <repository>
       <id>central-plugins</id>
       <name>Maven Central Plugins Repository</name>
@@ -83,11 +88,18 @@
   </distributionManagement>
   <repositories>
     <repository>
-      <id>central-plugins</id>
-      <name>Maven Central Plugins Repository</name>
-      <url>http://repo1.maven.org/maven2/plugins</url>
+      <id>snapshots</id>
+      <name>Maven Central Development Repository</name>
+      <url>http://snapshots.maven.codehaus.org/maven2</url>
     </repository>
   </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>snapshots</id>
+      <name>Maven Central Plugins Development Repository</name>
+      <url>http://snapshots.maven.codehaus.org/maven2/plugins</url>
+    </pluginRepository>
+  </pluginRepositories>
   <modules>
     <module>maven-ant-plugin</module>
     <module>maven-assembly-plugin</module>

Modified: maven/components/trunk/maven-profile/profiles.mdo
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-profile/profiles.mdo?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-profile/profiles.mdo (original)
+++ maven/components/trunk/maven-profile/profiles.mdo Mon Jul 25 02:51:12 2005
@@ -132,8 +132,10 @@
         </field>
       </fields>
     </class>
+
+    <!-- TODO: reproduced from maven-model/maven.mdo, instead should inherit code and link to external docs -->
     <class>
-      <name>Repository</name>
+      <name>RepositoryBase</name>
       <version>1.0.0</version>
       <description><![CDATA[
          Repository contains the information needed
@@ -165,30 +167,13 @@
           <type>String</type>
         </field>
         <field>
-          <name>snapshotPolicy</name>
-          <version>1.0.0</version>
-          <description>The policy for downloading snapshots - can be "always",
-            "daily" (default), "interval:XXX" (in minutes) or "never".
-          </description>
-          <type>String</type>
-          <defaultValue>daily</defaultValue>
-        </field>
-        <field>
           <name>layout</name>
           <version>1.0.0</version>
-          <description>The type of layout this repository uses for locating and
-            storing artifacts - can be "legacy" or "default".</description>
+          <description>The type of layout this repository uses for locating and storing artifacts - can be "legacy" or
+            "default".</description>
           <type>String</type>
           <defaultValue>default</defaultValue>
         </field>
-        <field>
-          <name>checksumPolicy</name>
-          <version>1.0.0</version>
-          <description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are
-            "fail" or "warn"</description>
-          <type>String</type>
-          <defaultValue>warn</defaultValue>
-        </field>
       </fields>
       <codeSegments>
         <codeSegment>
@@ -196,7 +181,7 @@
           <code><![CDATA[
             public boolean equals( Object obj )
             {
-                Repository other =  ( Repository ) obj;
+                RepositoryBase other =  (RepositoryBase) obj;
 
                 boolean retValue = false;
 
@@ -211,6 +196,95 @@
         </codeSegment>
       </codeSegments>
     </class>
+
+    <class>
+      <name>Repository</name>
+      <superClass>RepositoryBase</superClass>
+      <version>1.0.0</version>
+      <description>
+        Repository contains the information needed for establishing connections with remote repoistory
+      </description>
+      <fields>
+        <!-- TODO: deprecated -->
+        <field>
+          <name>snapshotPolicy</name>
+          <version>1.0.0</version>
+          <description>
+            The policy for downloading snapshots - can be "always", "daily" (default), "interval:XXX" (in minutes) or
+            "never" (repository is not checked, even if the snapshot is not present locally).
+          </description>
+          <type>String</type>
+        </field>
+        <!-- TODO: deprecated -->
+        <field>
+          <name>checksumPolicy</name>
+          <version>1.0.0</version>
+          <description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are
+            "fail" or "warn"</description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>releases</name>
+          <version>1.0.0</version>
+          <description>How to handle downloading of releases from this repository</description>
+          <association>
+            <type>RepositoryPolicy</type>
+          </association>
+        </field>
+        <field>
+          <name>snapshots</name>
+          <version>1.0.0</version>
+          <description>How to handle downloading of snapshots from this repository</description>
+          <association>
+            <type>RepositoryPolicy</type>
+          </association>
+        </field>
+      </fields>
+      <!-- prevent modello generation of an incorrect equals method. Could be avoided by using <identity/> tags to mark ID as the only identity field -->
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0</version>
+          <code><![CDATA[
+            public boolean equals( Object obj )
+            {
+                return super.equals( obj );
+            }
+          ]]></code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+
+    <class>
+      <name>RepositoryPolicy</name>
+      <version>1.0.0</version>
+      <description>Download policy</description>
+      <fields>
+        <field>
+          <name>enabled</name>
+          <version>1.0.0</version>
+          <description>Whether to use this repository for downloading this type of artifact</description>
+          <type>boolean</type>
+          <defaultValue>true</defaultValue>
+        </field>
+        <field>
+          <name>updatePolicy</name>
+          <version>1.0.0</version>
+          <description>
+            The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or
+            "never" (only if it doesn't exist locally).
+          </description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>checksumPolicy</name>
+          <version>1.0.0</version>
+          <description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are
+            "fail" or "warn"</description>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+
     <class>
       <name>ActivationProperty</name>
       <version>1.0.0</version>

Modified: 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=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java (original)
+++ maven/components/trunk/maven-profile/src/main/java/org/apache/maven/profiles/ProfilesConversionUtils.java Mon Jul 25 02:51:12 2005
@@ -102,7 +102,25 @@
         repo.setChecksumPolicy( profileXmlRepo.getChecksumPolicy() );
         repo.setUrl( profileXmlRepo.getUrl() );
 
+        if ( profileXmlRepo.getSnapshots() != null )
+        {
+            repo.setSnapshots( convertRepositoryPolicy( profileXmlRepo.getSnapshots() ) );
+        }
+        if ( profileXmlRepo.getReleases() != null )
+        {
+            repo.setReleases( convertRepositoryPolicy( profileXmlRepo.getReleases() ) );
+        }
+
         return repo;
+    }
+
+    private static org.apache.maven.model.RepositoryPolicy convertRepositoryPolicy( RepositoryPolicy profileXmlRepo )
+    {
+        org.apache.maven.model.RepositoryPolicy policy = new org.apache.maven.model.RepositoryPolicy();
+        policy.setEnabled( profileXmlRepo.isEnabled() );
+        policy.setUpdatePolicy( profileXmlRepo.getUpdatePolicy() );
+        policy.setChecksumPolicy( profileXmlRepo.getChecksumPolicy() );
+        return policy;
     }
 
 }

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=224707&r1=224706&r2=224707&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 Mon Jul 25 02:51:12 2005
@@ -308,6 +308,7 @@
     {
         Model superModel = getSuperModel();
 
+        //noinspection CollectionDeclaredAsConcreteClass
         LinkedList lineage = new LinkedList();
 
         Set aggregatedRemoteWagonRepositories = new HashSet();
@@ -434,8 +435,16 @@
         DistributionManagement dm = model.getDistributionManagement();
         if ( dm != null )
         {
-            project.setDistributionManagementArtifactRepository(
-                ProjectUtils.buildArtifactRepository( dm.getRepository(), artifactRepositoryFactory, container ) );
+            ArtifactRepository repo = ProjectUtils.buildArtifactRepositoryBase( dm.getRepository(),
+                                                                                artifactRepositoryFactory, container );
+            project.setReleaseArtifactRepository( repo );
+
+            if ( dm.getSnapshotRepository() != null )
+            {
+                repo = ProjectUtils.buildArtifactRepositoryBase( dm.getSnapshotRepository(), artifactRepositoryFactory,
+                                                                 container );
+                project.setSnapshotArtifactRepository( repo );
+            }
         }
 
         project.setParent( parentProject );
@@ -464,6 +473,7 @@
         return project;
     }
 
+    /** @noinspection CollectionDeclaredAsConcreteClass*/
     private MavenProject assembleLineage( Model model, LinkedList lineage, List aggregatedRemoteWagonRepositories,
                                           ArtifactRepository localRepository )
         throws ProjectBuildingException

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/MavenProject.java Mon Jul 25 02:51:12 2005
@@ -100,7 +100,9 @@
 
     private List pluginArtifactRepositories;
 
-    private ArtifactRepository distMgmtArtifactRepository;
+    private ArtifactRepository releaseArtifactRepository;
+
+    private ArtifactRepository snapshotArtifactRepository;
 
     private List activeProfiles = new ArrayList();
 
@@ -833,14 +835,14 @@
     {
         return pluginArtifacts;
     }
-    
+
     public Map getPluginArtifactMap()
     {
         if ( pluginArtifactMap == null )
         {
             pluginArtifactMap = ArtifactUtils.artifactMapByVersionlessId( getPluginArtifacts() );
         }
-        
+
         return pluginArtifactMap;
     }
 
@@ -848,7 +850,7 @@
     {
         this.reportArtifacts = reportArtifacts;
     }
-    
+
     public Set getReportArtifacts()
     {
         return reportArtifacts;
@@ -860,7 +862,7 @@
         {
             reportArtifactMap = ArtifactUtils.artifactMapByVersionlessId( getReportArtifacts() );
         }
-        
+
         return reportArtifactMap;
     }
 
@@ -957,14 +959,9 @@
         return pluginArtifactRepositories;
     }
 
-    public void setDistributionManagementArtifactRepository( ArtifactRepository distMgmtArtifactRepository )
-    {
-        this.distMgmtArtifactRepository = distMgmtArtifactRepository;
-    }
-
     public ArtifactRepository getDistributionManagementArtifactRepository()
     {
-        return distMgmtArtifactRepository;
+        return getArtifact().isSnapshot() ? snapshotArtifactRepository : releaseArtifactRepository;
     }
 
     public List getPluginRepositories()
@@ -1151,12 +1148,22 @@
     {
         this.dependencyArtifacts = dependencyArtifacts;
     }
-    
+
+    public void setReleaseArtifactRepository( ArtifactRepository releaseArtifactRepository )
+    {
+        this.releaseArtifactRepository = releaseArtifactRepository;
+    }
+
+    public void setSnapshotArtifactRepository( ArtifactRepository snapshotArtifactRepository )
+    {
+        this.snapshotArtifactRepository = snapshotArtifactRepository;
+    }
+
     public void setOriginalModel( Model originalModel )
     {
         this.originalModel = originalModel;
     }
-    
+
     public Model getOriginalModel()
     {
         return originalModel;
@@ -1175,14 +1182,13 @@
         else
         {
             MavenProject otherProject = (MavenProject) other;
-            
+
             return getId().equals( otherProject.getId() );
         }
     }
-    
+
     public int hashCode()
     {
         return getId().hashCode();
     }
-    
 }

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectUtils.java Mon Jul 25 02:51:12 2005
@@ -18,8 +18,11 @@
 
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryFactory;
+import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.model.Repository;
+import org.apache.maven.model.RepositoryBase;
+import org.apache.maven.model.RepositoryPolicy;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 
@@ -56,6 +59,27 @@
         return repos;
     }
 
+    public static ArtifactRepository buildArtifactRepositoryBase( RepositoryBase repo,
+                                                                  ArtifactRepositoryFactory artifactRepositoryFactory,
+                                                                  PlexusContainer container )
+        throws ProjectBuildingException
+    {
+        if ( repo != null )
+        {
+            String id = repo.getId();
+            String url = repo.getUrl();
+
+            // TODO: make this a map inside the factory instead, so no lookup needed
+            ArtifactRepositoryLayout layout = getRepositoryLayout( repo, container );
+
+            return artifactRepositoryFactory.createArtifactRepository( id, url, layout );
+        }
+        else
+        {
+            return null;
+        }
+    }
+
     public static ArtifactRepository buildArtifactRepository( Repository repo,
                                                               ArtifactRepositoryFactory artifactRepositoryFactory,
                                                               PlexusContainer container )
@@ -65,14 +89,18 @@
         {
             String id = repo.getId();
             String url = repo.getUrl();
-            String snapshotPolicy = repo.getSnapshotPolicy();
-            String checksumPolicy = repo.getChecksumPolicy();
 
             // TODO: make this a map inside the factory instead, so no lookup needed
             ArtifactRepositoryLayout layout = getRepositoryLayout( repo, container );
 
-            return artifactRepositoryFactory.createArtifactRepository( id, url, layout, snapshotPolicy,
-                                                                       checksumPolicy );
+            ArtifactRepositoryPolicy snapshots = buildArtifactRepositoryPolicy( repo.getSnapshots(),
+                                                                                repo.getSnapshotPolicy(),
+                                                                                repo.getChecksumPolicy() );
+            ArtifactRepositoryPolicy releases = buildArtifactRepositoryPolicy( repo.getReleases(),
+                                                                               repo.getSnapshotPolicy(),
+                                                                               repo.getChecksumPolicy() );
+
+            return artifactRepositoryFactory.createArtifactRepository( id, url, layout, snapshots, releases );
         }
         else
         {
@@ -80,21 +108,44 @@
         }
     }
 
-    private static ArtifactRepositoryLayout getRepositoryLayout( Repository mavenRepo, PlexusContainer container )
+    private static ArtifactRepositoryPolicy buildArtifactRepositoryPolicy( RepositoryPolicy policy,
+                                                                           String defaultUpdatePolicy,
+                                                                           String defaultChecksumPolicy )
+    {
+        boolean enabled = true;
+        String updatePolicy = defaultUpdatePolicy;
+        String checksumPolicy = defaultChecksumPolicy;
+
+        if ( policy != null )
+        {
+            enabled = policy.isEnabled();
+            if ( policy.getUpdatePolicy() != null )
+            {
+                updatePolicy = policy.getUpdatePolicy();
+            }
+            if ( policy.getChecksumPolicy() != null )
+            {
+                checksumPolicy = policy.getChecksumPolicy();
+            }
+        }
+
+        return new ArtifactRepositoryPolicy( enabled, updatePolicy, checksumPolicy );
+    }
+
+    private static ArtifactRepositoryLayout getRepositoryLayout( RepositoryBase mavenRepo, PlexusContainer container )
         throws ProjectBuildingException
     {
         String layout = mavenRepo.getLayout();
 
-        ArtifactRepositoryLayout repositoryLayout = null;
+        ArtifactRepositoryLayout repositoryLayout;
         try
         {
             repositoryLayout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE, layout );
         }
         catch ( ComponentLookupException e )
         {
-            throw new ProjectBuildingException(
-                "Cannot find layout implementation corresponding to: \'" + layout +
-                    "\' for remote repository with id: \'" + mavenRepo.getId() + "\'.", e );
+            throw new ProjectBuildingException( "Cannot find layout implementation corresponding to: \'" + layout +
+                "\' for remote repository with id: \'" + mavenRepo.getId() + "\'.", e );
         }
         return repositoryLayout;
     }

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java (original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/inheritance/DefaultModelInheritanceAssembler.java Mon Jul 25 02:51:12 2005
@@ -581,6 +581,22 @@
                     repository.setUrl( parentDistMgmt.getRepository().getUrl() );
                 }
             }
+
+            if ( childDistMgmt.getSnapshotRepository() == null )
+            {
+                if ( parentDistMgmt.getSnapshotRepository() != null )
+                {
+                    Repository repository = new Repository();
+
+                    childDistMgmt.setSnapshotRepository( repository );
+
+                    repository.setId( parentDistMgmt.getSnapshotRepository().getId() );
+
+                    repository.setName( parentDistMgmt.getSnapshotRepository().getName() );
+
+                    repository.setUrl( parentDistMgmt.getSnapshotRepository().getUrl() );
+                }
+            }
         }
     }
 

Modified: maven/components/trunk/maven-settings/settings.mdo
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-settings/settings.mdo?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/maven-settings/settings.mdo (original)
+++ maven/components/trunk/maven-settings/settings.mdo Mon Jul 25 02:51:12 2005
@@ -579,8 +579,10 @@
         </field>
       </fields>
     </class>
+
+    <!-- TODO: reproduced from maven-model/maven.mdo, instead should inherit code and link to external docs -->
     <class>
-      <name>Repository</name>
+      <name>RepositoryBase</name>
       <version>1.0.0</version>
       <description><![CDATA[
          Repository contains the information needed
@@ -612,29 +614,13 @@
           <type>String</type>
         </field>
         <field>
-          <name>snapshotPolicy</name>
-          <version>1.0.0</version>
-          <description> The policy for downloading snapshots - can be "always", 
-            "daily" (default), "interval:XXX" (in minutes) or "never". 
-            </description>
-          <type>String</type>
-          <defaultValue>daily</defaultValue>
-        </field>
-        <field>
           <name>layout</name>
           <version>1.0.0</version>
-          <description>The type of layout this repository uses for locating and 
-            storing artifacts - can be "legacy" or "default".</description>
+          <description>The type of layout this repository uses for locating and storing artifacts - can be "legacy" or
+            "default".</description>
           <type>String</type>
           <defaultValue>default</defaultValue>
         </field>
-        <field>
-          <name>checksumPolicy</name>
-          <version>1.0.0</version>
-          <description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are "fail" or "warn"</description>
-          <type>String</type>
-          <defaultValue>warn</defaultValue>
-        </field>
       </fields>
       <codeSegments>
         <codeSegment>
@@ -642,7 +628,7 @@
           <code><![CDATA[
             public boolean equals( Object obj )
             {
-                Repository other =  ( Repository ) obj;
+                RepositoryBase other =  (RepositoryBase) obj;
 
                 boolean retValue = false;
 
@@ -657,6 +643,95 @@
         </codeSegment>
       </codeSegments>
     </class>
+
+    <class>
+      <name>Repository</name>
+      <superClass>RepositoryBase</superClass>
+      <version>1.0.0</version>
+      <description>
+        Repository contains the information needed for establishing connections with remote repoistory
+      </description>
+      <fields>
+        <!-- TODO: deprecated -->
+        <field>
+          <name>snapshotPolicy</name>
+          <version>1.0.0</version>
+          <description>
+            The policy for downloading snapshots - can be "always", "daily" (default), "interval:XXX" (in minutes) or
+            "never" (repository is not checked, even if the snapshot is not present locally).
+          </description>
+          <type>String</type>
+        </field>
+        <!-- TODO: deprecated -->
+        <field>
+          <name>checksumPolicy</name>
+          <version>1.0.0</version>
+          <description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are
+            "fail" or "warn"</description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>releases</name>
+          <version>1.0.0</version>
+          <description>How to handle downloading of releases from this repository</description>
+          <association>
+            <type>RepositoryPolicy</type>
+          </association>
+        </field>
+        <field>
+          <name>snapshots</name>
+          <version>1.0.0</version>
+          <description>How to handle downloading of snapshots from this repository</description>
+          <association>
+            <type>RepositoryPolicy</type>
+          </association>
+        </field>
+      </fields>
+      <!-- prevent modello generation of an incorrect equals method. Could be avoided by using <identity/> tags to mark ID as the only identity field -->
+      <codeSegments>
+        <codeSegment>
+          <version>1.0.0</version>
+          <code><![CDATA[
+            public boolean equals( Object obj )
+            {
+                return super.equals( obj );
+            }
+          ]]></code>
+        </codeSegment>
+      </codeSegments>
+    </class>
+
+    <class>
+      <name>RepositoryPolicy</name>
+      <version>1.0.0</version>
+      <description>Download policy</description>
+      <fields>
+        <field>
+          <name>enabled</name>
+          <version>1.0.0</version>
+          <description>Whether to use this repository for downloading this type of artifact</description>
+          <type>boolean</type>
+          <defaultValue>true</defaultValue>
+        </field>
+        <field>
+          <name>updatePolicy</name>
+          <version>1.0.0</version>
+          <description>
+            The frequency for downloading updates - can be "always", "daily" (default), "interval:XXX" (in minutes) or
+            "never" (only if it doesn't exist locally).
+          </description>
+          <type>String</type>
+        </field>
+        <field>
+          <name>checksumPolicy</name>
+          <version>1.0.0</version>
+          <description>What to do when verification of an artifact checksum fails - warn, fail, etc. Valid values are
+            "fail" or "warn"</description>
+          <type>String</type>
+        </field>
+      </fields>
+    </class>
+
     <class>
       <name>ActivationProperty</name>
       <version>1.0.0</version>

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=224707&r1=224706&r2=224707&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 Mon Jul 25 02:51:12 2005
@@ -1,13 +1,5 @@
 package org.apache.maven.settings;
 
-import org.codehaus.plexus.util.StringUtils;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /*
  * Copyright 2001-2005 The Apache Software Foundation.
  *
@@ -24,9 +16,16 @@
  * limitations under the License.
  */
 
+import org.codehaus.plexus.util.StringUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 public final class SettingsUtils
 {
-
     private SettingsUtils()
     {
         // don't allow construction.
@@ -51,7 +50,7 @@
                 dominantActiveProfiles = new ArrayList();
                 dominant.setActiveProfiles( dominantActiveProfiles );
             }
-            
+
             for ( Iterator it = recessiveActiveProfiles.iterator(); it.hasNext(); )
             {
                 String profileId = (String) it.next();
@@ -68,14 +67,14 @@
         List dominantPluginGroupIds = dominant.getPluginGroups();
         List recessivePluginGroupIds = recessive.getPluginGroups();
 
-        if( recessivePluginGroupIds != null )
+        if ( recessivePluginGroupIds != null )
         {
-            if( dominantPluginGroupIds == null )
+            if ( dominantPluginGroupIds == null )
             {
                 dominantPluginGroupIds = new ArrayList();
                 dominant.setPluginGroups( dominantPluginGroupIds );
             }
-            
+
             for ( Iterator it = recessivePluginGroupIds.iterator(); it.hasNext(); )
             {
                 String pluginGroupId = (String) it.next();
@@ -142,7 +141,7 @@
 
         profile.setSource( "settings.xml" );
 
-        org.apache.maven.settings.Activation settingsActivation = settingsProfile.getActivation();
+        Activation settingsActivation = settingsProfile.getActivation();
 
         if ( settingsActivation != null )
         {
@@ -150,7 +149,7 @@
 
             activation.setJdk( settingsActivation.getJdk() );
 
-            org.apache.maven.settings.ActivationProperty settingsProp = settingsActivation.getProperty();
+            ActivationProperty settingsProp = settingsActivation.getProperty();
 
             if ( settingsProp != null )
             {
@@ -197,7 +196,25 @@
         repo.setChecksumPolicy( settingsRepo.getChecksumPolicy() );
         repo.setUrl( settingsRepo.getUrl() );
 
+        if ( settingsRepo.getSnapshots() != null )
+        {
+            repo.setSnapshots( convertRepositoryPolicy( settingsRepo.getSnapshots() ) );
+        }
+        if ( settingsRepo.getReleases() != null )
+        {
+            repo.setReleases( convertRepositoryPolicy( settingsRepo.getReleases() ) );
+        }
+
         return repo;
+    }
+
+    private static org.apache.maven.model.RepositoryPolicy convertRepositoryPolicy( RepositoryPolicy settingsPolicy )
+    {
+        org.apache.maven.model.RepositoryPolicy policy = new org.apache.maven.model.RepositoryPolicy();
+        policy.setEnabled( settingsPolicy.isEnabled() );
+        policy.setUpdatePolicy( settingsPolicy.getUpdatePolicy() );
+        policy.setChecksumPolicy( settingsPolicy.getChecksumPolicy() );
+        return policy;
     }
 
 }

Modified: maven/components/trunk/pom.xml
URL: http://svn.apache.org/viewcvs/maven/components/trunk/pom.xml?rev=224707&r1=224706&r2=224707&view=diff
==============================================================================
--- maven/components/trunk/pom.xml (original)
+++ maven/components/trunk/pom.xml Mon Jul 25 02:51:12 2005
@@ -105,17 +105,32 @@
     <repository>
       <id>repo1</id>
       <name>Maven Central Repository</name>
-<!-- Waiting for release files to be mirror
-      <url>scp://repo1.maven.org/home/projects/maven/repository-staging/to-ibiblio/maven</url>
-      <layout>legacy</layout>
--->
       <url>scp://repo1.maven.org/home/projects/maven/repository-staging/to-ibiblio/maven2</url>
     </repository>
+    <snapshotRepository>
+      <id>snapshots</id>
+      <name>Maven Central Development Repository</name>
+      <url>scp://repo1.maven.org/home/projects/maven/repository-staging/snapshots/maven2</url>
+    </snapshotRepository>
     <site>
       <id>website</id>
       <url>scp://minotaur.apache.org/www/maven.apache.org/maven2/</url>
     </site>
   </distributionManagement>
+  <repositories>
+    <repository>
+      <id>snapshots</id>
+      <name>Maven Central Development Repository</name>
+      <url>http://snapshots.maven.codehaus.org/maven2</url>
+    </repository>
+  </repositories>
+  <pluginRepositories>
+    <pluginRepository>
+      <id>snapshots</id>
+      <name>Maven Central Plugins Development Repository</name>
+      <url>http://snapshots.maven.codehaus.org/maven2/plugins</url>
+    </pluginRepository>
+  </pluginRepositories>
   <modules>
     <!-- module>maven-archetype</module -->
     <module>maven-archiver</module>



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