You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jv...@apache.org on 2007/10/22 20:59:50 UTC

svn commit: r587197 - in /maven/artifact/trunk: pom.xml src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java src/main/resources/META-INF/plexus/components.xml

Author: jvanzyl
Date: Mon Oct 22 11:59:50 2007
New Revision: 587197

URL: http://svn.apache.org/viewvc?rev=587197&view=rev
Log:
o using the active maps in the container

Modified:
    maven/artifact/trunk/pom.xml
    maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
    maven/artifact/trunk/src/main/resources/META-INF/plexus/components.xml

Modified: maven/artifact/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/pom.xml?rev=587197&r1=587196&r2=587197&view=diff
==============================================================================
--- maven/artifact/trunk/pom.xml (original)
+++ maven/artifact/trunk/pom.xml Mon Oct 22 11:59:50 2007
@@ -45,12 +45,7 @@
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-container-default</artifactId>
-      <version>1.0-alpha-32</version>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.plexus</groupId>
-      <artifactId>plexus-active-collections</artifactId>
-      <version>1.0-beta-1</version>
+      <version>1.0-alpha-34-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.wagon</groupId>

Modified: maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java?rev=587197&r1=587196&r2=587197&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java (original)
+++ maven/artifact/trunk/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepositoryFactory.java Mon Oct 22 11:59:50 2007
@@ -22,7 +22,6 @@
 import org.apache.maven.artifact.InvalidRepositoryException;
 import org.apache.maven.artifact.UnknownRepositoryLayoutException;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.codehaus.plexus.collections.ActiveMap;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 
 import java.io.File;
@@ -44,22 +43,12 @@
     // FIXME: This is a non-ThreadLocal cache!!
     private final Map artifactRepositories = new HashMap();
 
-    private ActiveMap repositoryLayouts;
+    private Map repositoryLayouts;
 
     public ArtifactRepositoryLayout getLayout( String layoutId )
         throws UnknownRepositoryLayoutException
     {
-        ArtifactRepositoryLayout layout;
-        try
-        {
-            layout = (ArtifactRepositoryLayout) repositoryLayouts.checkedGet( layoutId );
-        }
-        catch ( ComponentLookupException e )
-        {
-            throw new UnknownRepositoryLayoutException( "unknown", layoutId, e );
-        }
-
-        return layout;
+        return (ArtifactRepositoryLayout) repositoryLayouts.get( layoutId );
     }
 
     public ArtifactRepository createDeploymentArtifactRepository( String id, String url,
@@ -67,15 +56,7 @@
                                                         boolean uniqueVersion )
         throws UnknownRepositoryLayoutException
     {
-        ArtifactRepositoryLayout layout;
-        try
-        {
-            layout = (ArtifactRepositoryLayout) repositoryLayouts.checkedGet( layoutId );
-        }
-        catch ( ComponentLookupException e )
-        {
-            throw new UnknownRepositoryLayoutException( id, layoutId, e );
-        }
+        ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) repositoryLayouts.get( layoutId );
 
         return createDeploymentArtifactRepository( id, url, layout, uniqueVersion );
     }
@@ -93,15 +74,7 @@
                                                         ArtifactRepositoryPolicy releases )
         throws UnknownRepositoryLayoutException
     {
-        ArtifactRepositoryLayout layout;
-        try
-        {
-            layout = (ArtifactRepositoryLayout) repositoryLayouts.checkedGet( layoutId );
-        }
-        catch ( ComponentLookupException e )
-        {
-            throw new UnknownRepositoryLayoutException( id, layoutId, e );
-        }
+        ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) repositoryLayouts.get( layoutId );
 
         return createArtifactRepository( id, url, layout, snapshots, releases );
     }

Modified: maven/artifact/trunk/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/maven/artifact/trunk/src/main/resources/META-INF/plexus/components.xml?rev=587197&r1=587196&r2=587197&view=diff
==============================================================================
--- maven/artifact/trunk/src/main/resources/META-INF/plexus/components.xml (original)
+++ maven/artifact/trunk/src/main/resources/META-INF/plexus/components.xml Mon Oct 22 11:59:50 2007
@@ -30,15 +30,6 @@
       <role-hint>legacy</role-hint>
       <implementation>org.apache.maven.artifact.repository.layout.LegacyRepositoryLayout</implementation>
     </component>
-    
-    <component>
-      <role>org.codehaus.plexus.collections.ActiveMap</role>
-      <role-hint>repositoryLayouts</role-hint>
-      <implementation>org.codehaus.plexus.collections.DefaultActiveMap</implementation>
-      <configuration>
-        <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
-      </configuration>
-    </component>
 
     <!--
      |
@@ -444,8 +435,7 @@
       <implementation>org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory</implementation>
       <requirements>
         <requirement>
-          <role>org.codehaus.plexus.collections.ActiveMap</role>
-          <role-hint>repositoryLayouts</role-hint>
+          <role>org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout</role>
           <field-name>repositoryLayouts</field-name>
         </requirement>
       </requirements>