Author: mkleint
Date: Tue Feb 12 11:37:24 2008
New Revision: 627055

URL: http://svn.apache.org/viewvc?rev=627055&view=rev
Log:
when archetype ids are defined and only the repository is missing, fallback to 
central and don't show the list to pick from. add a descriptive warning with 
instructions on how to set different repository.

Modified:
    
maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java

Modified: 
maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java?rev=627055&r1=627054&r2=627055&view=diff
==============================================================================
--- 
maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java
 (original)
+++ 
maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java
 Tue Feb 12 11:37:24 2008
@@ -116,11 +116,10 @@
                 }
                 if ( !found )
                 {
-                    getLogger ().warn ( "No archetype repository found." );
-                    if ( interactiveMode.booleanValue () )
-                    {
-                        definition.setVersion ( null );
-                    }
+                    getLogger ().warn ( "No archetype repository found. 
Falling back to central repository (http://repo1.maven.org/maven2). " );
+                    getLogger ().warn ( "Use -DarchetypeRepository=<your 
repository> if archetype's repository is elsewhere." );
+                    
+                    definition.setRepository("http://repo1.maven.org/maven2";);
                 }
             }
             if ( !definition.isDefined () && definition.isPartiallyDefined () )


Reply via email to