]> source.dussan.org Git - archiva.git/commitdiff
fix the plexus requirement
authorBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 14:46:23 +0000 (14:46 +0000)
committerBrett Porter <brett@apache.org>
Sat, 26 Aug 2006 14:46:23 +0000 (14:46 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@437170 13f79535-47bb-0310-9956-ffa450edef68

archiva-core/src/main/java/org/apache/maven/archiva/configuration/DefaultConfiguredRepositoryFactory.java

index 6485c52b684cd0832a89bc356123a3bf6a234fb2..3ba777715e22b0b4c92860b225d6967c1aae04b0 100644 (file)
@@ -38,7 +38,7 @@ public class DefaultConfiguredRepositoryFactory
     implements ConfiguredRepositoryFactory
 {
     /**
-     * @plexus.requirement role="org.apache.maven.artifact.archiva.layout.ArtifactRepositoryLayout"
+     * @plexus.requirement role="org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout"
      */
     private Map repositoryLayouts;
 
@@ -70,6 +70,12 @@ public class DefaultConfiguredRepositoryFactory
             new ArtifactRepositoryPolicy( enabled, updatePolicy, ArtifactRepositoryPolicy.CHECKSUM_POLICY_FAIL );
 
         ArtifactRepositoryLayout layout = (ArtifactRepositoryLayout) repositoryLayouts.get( configuration.getLayout() );
+
+        if ( layout == null )
+        {
+            throw new IllegalArgumentException( "Invalid layout: " + configuration.getLayout() );
+        }
+
         ArtifactRepository artifactRepository = repoFactory.createArtifactRepository( configuration.getId(),
                                                                                       configuration.getUrl(), layout,
                                                                                       snapshotsPolicy, releasesPolicy );