You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2010/08/21 19:29:13 UTC

svn commit: r987799 - /maven/archetype/trunk/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java

Author: hboutemy
Date: Sat Aug 21 17:29:13 2010
New Revision: 987799

URL: http://svn.apache.org/viewvc?rev=987799&view=rev
Log:
code simplification

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=987799&r1=987798&r2=987799&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 Sat Aug 21 17:29:13 2010
@@ -124,7 +124,7 @@ public class DefaultArchetypeSelector
             definition.setVersion( DEFAULT_ARCHETYPE_VERSION );
         }
 
-        if ( !definition.isDefined() && !definition.isPartiallyDefined() )
+        if ( !definition.isPartiallyDefined() )
         {
             // if artifact ID is set to its default, we still prompt to confirm
             if ( definition.getArtifactId() == null )
@@ -143,14 +143,13 @@ public class DefaultArchetypeSelector
 
                 updateDefinition( definition, selectedArchetype, catalogKey );
             }
-        }
 
-        // Make sure the groupId and artifactId are valid, the version may just default to
-        // the latest release.
-
-        if ( !definition.isPartiallyDefined() )
-        {
-            throw new ArchetypeSelectionFailure( "No valid archetypes could be found to choose." );
+            // Make sure the groupId and artifactId are valid, the version may just default to
+            // the latest release.
+            if ( !definition.isPartiallyDefined() )
+            {
+                throw new ArchetypeSelectionFailure( "No valid archetypes could be found to choose." );
+            }
         }
 
         // finally update the request with gathered information