maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r579508 - in /maven/sandbox/trunk/archetypeng: archetype-common/src/main/java/org/apache/maven/archetype/ archetype-common/src/main/java/org/apache/maven/archetype/common/ archetype-common/src/main/java/org/apache/maven/archetype/source/ ar...
Date Wed, 26 Sep 2007 08:27:52 GMT
Author: jvanzyl
Date: Wed Sep 26 01:27:50 2007
New Revision: 579508

URL: http://svn.apache.org/viewvc?rev=579508&view=rev
Log:
o add sources for archetypes
o remove the criteria and for now we'll just let source constructors pass in any info
o rename facade to Archetyper

Added:
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java
  (contents, props changed)
      - copied, changed from r579482, maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeFacade.java
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
  (contents, props changed)
      - copied, changed from r579482, maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeFacade.java
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
  (contents, props changed)
      - copied, changed from r579482, maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeSource.java
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java
  (with props)
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java
  (with props)
Removed:
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeCriteria.java
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeFacade.java
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeSource.java
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeFacade.java
    maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/SamplePropertiesMojo.java
Modified:
    maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeRegistryManager.java
    maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java
    maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java
    maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java

Copied: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java
(from r579482, maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeFacade.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java?p2=maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java&p1=maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeFacade.java&r1=579482&r2=579508&rev=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeFacade.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java
Wed Sep 26 01:27:50 2007
@@ -1,9 +1,9 @@
 package org.apache.maven.archetype;
 
 /** @author Jason van Zyl */
-public interface ArchetypeFacade
+public interface Archetyper
 {
-    String ROLE = ArchetypeFacade.class.getName();
+    String ROLE = Archetyper.class.getName();
 
     ArchetypeCreationResult createArchetypeFromProject( ArchetypeCreationRequest request
);
 

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/Archetyper.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Copied: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
(from r579482, maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeFacade.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java?p2=maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java&p1=maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeFacade.java&r1=579482&r2=579508&rev=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetypeFacade.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
Wed Sep 26 01:27:50 2007
@@ -1,8 +1,8 @@
 package org.apache.maven.archetype;
 
 /** @author Jason van Zyl */
-public class DefaultArchetypeFacade
-    implements ArchetypeFacade
+public class DefaultArchetyper
+    implements Archetyper
 {
     public ArchetypeCreationResult createArchetypeFromProject( ArchetypeCreationRequest request
)
     {

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/DefaultArchetyper.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeRegistryManager.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeRegistryManager.java?rev=579508&r1=579507&r2=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeRegistryManager.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/common/DefaultArchetypeRegistryManager.java
Wed Sep 26 01:27:50 2007
@@ -254,90 +254,6 @@
 
         registry.getFilteredExtensions().addAll( Constants.DEFAULT_FILTERED_EXTENSIONS );
 
-        try
-        {
-            Map archetypes = loadArchetypesFromWiki( DEFAULT_ARCHETYPE_INVENTORY_PAGE );
-
-            for ( Iterator i = archetypes.values().iterator(); i.hasNext(); )
-            {
-                Archetype archetype = (Archetype) i.next();
-
-                registry.addArchetype( archetype );
-
-                if ( archetype.getRepository() == null )
-                {
-                    archetype.setRepository( "http://repo1.maven.org/maven2" );
-                }
-            }
-        }
-        catch ( Exception e )
-        {
-            getLogger().warn( "Could not load archetypes listed at " + DEFAULT_ARCHETYPE_INVENTORY_PAGE
);
-        }
-
         return registry;
-    }
-
-    private String DEFAULT_ARCHETYPE_INVENTORY_PAGE="http://docs.codehaus.org/pages/viewpagesrc.action?pageId=48400";
-
-    static Map loadArchetypesFromWiki( String url )
-        throws Exception
-    {
-        Map archetypes = new LinkedHashMap();
-
-        StringBuffer sb = new StringBuffer();
-
-        InputStream in = new URL( cleanupUrl( url ) ).openStream();
-
-        BufferedReader reader = new BufferedReader( new InputStreamReader( in ) );
-
-        char[] buffer = new char[1024];
-
-        int len = 0;
-
-        while ( ( len = reader.read( buffer ) ) > -1 )
-        {
-            sb.append( buffer, 0, len );
-        }
-
-        Pattern ptn = Pattern.compile( "<br>\\|([-a-zA-Z0-9_. ]+)\\|([-a-zA-Z0-9_.
]+)\\|([-a-zA-Z0-9_. ]+)\\|([-a-zA-Z0-9_.:/ \\[\\],]+)\\|([^|]+)\\|" );
-
-        Matcher m = ptn.matcher( sb.toString() );
-
-        while ( m.find() )
-        {
-            org.apache.maven.archetype.registry.Archetype arch = new Archetype();
-
-            arch.setArtifactId( m.group( 1 ).trim() );
-
-            arch.setGroupId( m.group( 2 ).trim() );
-
-            String version = m.group( 3 ).trim();
-
-            if ( version.equals( "" ) )
-            {
-                version = "RELEASE";
-            }
-
-            arch.setVersion( version );
-
-            arch.setRepository(cleanupUrl(m.group(4).trim()));
-
-            arch.setDescription( cleanup( m.group( 5 ).trim() ) );
-
-            archetypes.put( arch.getArtifactId(), arch );
-        }
-        return archetypes;
-    }
-
-    static String cleanup( String val )
-    {
-        val = val.replaceAll( "\\r|\\n|\\s{2,}", "" );
-        return val;
-    }
-
-    static String cleanupUrl( String val )
-    {
-        return val.replaceAll( "\\r|\\n|\\s{2,}|\\[|\\]|\\&nbsp;", "" );
     }
 }

Copied: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
(from r579482, maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeSource.java)
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java?p2=maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java&p1=maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeSource.java&r1=579482&r2=579508&rev=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/ArchetypeSource.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
Wed Sep 26 01:27:50 2007
@@ -1,6 +1,6 @@
-package org.apache.maven.archetype;
+package org.apache.maven.archetype.source;
 
-import java.util.List;
+import java.util.Map;
 
 /**
  * Sources we can get Archetypes from. This may be the local registry, a Wiki, or,
@@ -11,7 +11,8 @@
  *
  * @author Jason van Zyl
  */
-public interface ArchetypeSource
+public interface ArchetypeDataSource
 {
-    List getArchetypes( ArchetypeCriteria criteria );
+    Map getArchetypes()
+        throws ArchetypeDataSourceException;
 }

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSource.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java?rev=579508&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java
(added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java
Wed Sep 26 01:27:50 2007
@@ -0,0 +1,22 @@
+package org.apache.maven.archetype.source;
+
+/** @author Jason van Zyl */
+public class ArchetypeDataSourceException
+    extends Exception
+{
+    public ArchetypeDataSourceException( String s )
+    {
+        super( s );
+    }
+
+    public ArchetypeDataSourceException( String s,
+                                         Throwable throwable )
+    {
+        super( s, throwable );
+    }
+
+    public ArchetypeDataSourceException( Throwable throwable )
+    {
+        super( throwable );
+    }
+}

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/ArchetypeDataSourceException.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java?rev=579508&view=auto
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java
(added)
+++ maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java
Wed Sep 26 01:27:50 2007
@@ -0,0 +1,100 @@
+package org.apache.maven.archetype.source;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.IOException;
+import java.net.URL;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/** @author Jason van Zyl */
+public class WikiArchetypeDataSource
+    implements ArchetypeDataSource
+{
+    private static String DEFAULT_ARCHETYPE_INVENTORY_PAGE = "http://docs.codehaus.org/pages/viewpagesrc.action?pageId=48400";
+
+    private String url;
+
+    public WikiArchetypeDataSource()
+    {
+        this( DEFAULT_ARCHETYPE_INVENTORY_PAGE );
+    }
+
+    public WikiArchetypeDataSource( String url )
+    {
+        this.url = url;
+    }
+
+    public Map getArchetypes()
+        throws ArchetypeDataSourceException
+    {
+        Map archetypes = new LinkedHashMap();
+
+        StringBuffer sb = new StringBuffer();
+
+        try
+        {
+            InputStream in = new URL( cleanupUrl( url ) ).openStream();
+
+            BufferedReader reader = new BufferedReader( new InputStreamReader( in ) );
+
+            char[] buffer = new char[1024];
+
+            int len = 0;
+
+            while ( ( len = reader.read( buffer ) ) > -1 )
+            {
+                sb.append( buffer, 0, len );
+            }
+        }
+        catch ( IOException e )
+        {
+            throw new ArchetypeDataSourceException( "Error retrieving list of archetypes
from " + url );
+        }
+
+        Pattern ptn = Pattern.compile(
+            "<br>\\|([-a-zA-Z0-9_. ]+)\\|([-a-zA-Z0-9_. ]+)\\|([-a-zA-Z0-9_. ]+)\\|([-a-zA-Z0-9_.:/
\\[\\],]+)\\|([^|]+)\\|" );
+
+        Matcher m = ptn.matcher( sb.toString() );
+
+        while ( m.find() )
+        {
+            org.apache.maven.archetype.registry.Archetype arch = new org.apache.maven.archetype.registry.Archetype();
+
+            arch.setArtifactId( m.group( 1 ).trim() );
+
+            arch.setGroupId( m.group( 2 ).trim() );
+
+            String version = m.group( 3 ).trim();
+
+            if ( version.equals( "" ) )
+            {
+                version = "RELEASE";
+            }
+
+            arch.setVersion( version );
+
+            arch.setRepository( cleanupUrl( m.group( 4 ).trim() ) );
+
+            arch.setDescription( cleanup( m.group( 5 ).trim() ) );
+
+            archetypes.put( arch.getArtifactId(), arch );
+        }
+
+        return archetypes;
+    }
+
+    static String cleanup( String val )
+    {
+        val = val.replaceAll( "\\r|\\n|\\s{2,}", "" );
+        return val;
+    }
+
+    static String cleanupUrl( String val )
+    {
+        return val.replaceAll( "\\r|\\n|\\s{2,}|\\[|\\]|\\&nbsp;", "" );
+    }    
+}

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/sandbox/trunk/archetypeng/archetype-common/src/main/java/org/apache/maven/archetype/source/WikiArchetypeDataSource.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java?rev=579508&r1=579507&r2=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/ArchetypeSelectionQueryer.java
Wed Sep 26 01:27:50 2007
@@ -21,9 +21,9 @@
 
 import org.apache.maven.archetype.common.Archetype;
 import org.apache.maven.archetype.common.ArchetypeDefinition;
-
 import org.codehaus.plexus.components.interactivity.PrompterException;
 
+import java.util.Collection;
 import java.util.List;
 
 public interface ArchetypeSelectionQueryer
@@ -34,7 +34,7 @@
         throws
         PrompterException;
 
-    org.apache.maven.archetype.registry.Archetype selectArchetype( List list )
+    org.apache.maven.archetype.registry.Archetype selectArchetype( Collection collection
)
         throws
         PrompterException;
 

Modified: maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java?rev=579508&r1=579507&r2=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java
Wed Sep 26 01:27:50 2007
@@ -21,13 +21,13 @@
 
 import org.apache.maven.archetype.common.Archetype;
 import org.apache.maven.archetype.common.ArchetypeDefinition;
-
 import org.codehaus.plexus.components.interactivity.Prompter;
 import org.codehaus.plexus.components.interactivity.PrompterException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -54,7 +54,7 @@
         return "Y".equalsIgnoreCase( answer );
     }
 
-    public org.apache.maven.archetype.registry.Archetype selectArchetype( List archetypes
)
+    public org.apache.maven.archetype.registry.Archetype selectArchetype( Collection archetypes
)
         throws
         PrompterException
     {

Modified: maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java?rev=579508&r1=579507&r2=579508&view=diff
==============================================================================
--- maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java
(original)
+++ maven/sandbox/trunk/archetypeng/archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java
Wed Sep 26 01:27:50 2007
@@ -29,15 +29,18 @@
 import org.apache.maven.archetype.exception.ArchetypeSelectionFailure;
 import org.apache.maven.archetype.exception.UnknownArchetype;
 import org.apache.maven.archetype.exception.UnknownGroup;
+import org.apache.maven.archetype.source.ArchetypeDataSource;
+import org.apache.maven.archetype.source.ArchetypeDataSourceException;
+import org.apache.maven.archetype.source.WikiArchetypeDataSource;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.codehaus.plexus.components.interactivity.PrompterException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.StringUtils;
-import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 
@@ -113,21 +116,23 @@
 
             if ( !archetypeDefinition.isDefined() )
             {
-                List availableArchetypeInRegistry;
-                
+                Collection archetypes;
+
                 try
                 {
-                    availableArchetypeInRegistry = archetypeRegistryManager.readArchetypeRegistry(
archetypeRegistryFile ).getArchetypes();
+                    ArchetypeDataSource source = new WikiArchetypeDataSource();
+
+                    archetypes = source.getArchetypes().values();
                 }
-                catch ( XmlPullParserException e )
+                catch ( ArchetypeDataSourceException e )
                 {
-                    availableArchetypeInRegistry = archetypeRegistryManager.getDefaultArchetypeRegistry().getArchetypes();
+                    throw new ArchetypeSelectionFailure( "Error loading archetypes from data
source.", e );
                 }
 
-                if ( availableArchetypeInRegistry != null )
+                if ( archetypes != null )
                 {
                     org.apache.maven.archetype.registry.Archetype archetype = archetypeSelectionQueryer.selectArchetype(
-                        availableArchetypeInRegistry );
+                        archetypes );
 
                     ArchetypeDefinition ad = new ArchetypeDefinition();
 



Mime
View raw message