Author: jvanzyl
Date: Wed Oct 24 10:10:16 2007
New Revision: 587930

URL: http://svn.apache.org/viewvc?rev=587930&view=rev
Log:
o catch an incorrect repository property for the remote catalog 

Modified:
    
maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java

Modified: 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
URL: 
http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java?rev=587930&r1=587929&r2=587930&view=diff
==============================================================================
--- 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
 (original)
+++ 
maven/sandbox/trunk/archetypeng/archetypeng-common/src/main/java/org/apache/maven/archetype/source/RemoteCatalogArchetypeDataSource.java
 Wed Oct 24 10:10:16 2007
@@ -51,10 +51,15 @@
     public List getArchetypes( Properties properties )
         throws ArchetypeDataSourceException
     {
+        String repository = properties.getProperty( REPOSITORY_PROPERTY );
+        
+        if ( repository == null )
+        {
+            throw new ArchetypeDataSourceException( "To use the remote catalog 
you must specify the 'remote-catalog.repository' property correctly in your 
~/.m2/archetype-catalog.properties file." );
+        }
+        
         try
         {
-            String repository = properties.getProperty( REPOSITORY_PROPERTY );
-
             if ( repository.endsWith( "/" ) )
             {
                 repository = repository.substring( 0, repository.length(  ) - 
1 );
@@ -203,4 +208,4 @@
 
         return d;
     }
-}
\ No newline at end of file
+}


Reply via email to