You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2011/07/09 18:36:44 UTC

svn commit: r1144700 - in /maven/archetype/trunk/maven-archetype-plugin/src: main/java/org/apache/maven/archetype/ui/ site/apt/ site/apt/examples/

Author: olamy
Date: Sat Jul  9 16:36:44 2011
New Revision: 1144700

URL: http://svn.apache.org/viewvc?rev=1144700&view=rev
Log:
[ARCHETYPE-371] add some documentation on how to filtering archetypes list

Modified:
    maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java
    maven/archetype/trunk/maven-archetype-plugin/src/site/apt/advanced-usage.apt
    maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-multi-module-project.apt
    maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-with-property-file.apt
    maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt
    maven/archetype/trunk/maven-archetype-plugin/src/site/apt/usage.apt

Modified: maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java?rev=1144700&r1=1144699&r2=1144700&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelectionQueryer.java Sat Jul  9 16:36:44 2011
@@ -120,7 +120,7 @@ public class DefaultArchetypeSelectionQu
 
         }
 
-        query.append( "Choose a number or apply filter (format part of groupId:part if artifactId ) : " );
+        query.append( "Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ) : " );
 
         String answer;
         if ( defaultSelection == 0 )

Modified: maven/archetype/trunk/maven-archetype-plugin/src/site/apt/advanced-usage.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/site/apt/advanced-usage.apt?rev=1144700&r1=1144699&r2=1144700&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/site/apt/advanced-usage.apt (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/site/apt/advanced-usage.apt Sat Jul  9 16:36:44 2011
@@ -135,7 +135,7 @@ $ mvn archetype:generate -DarchetypeCata
 [INFO] [archetype:generate]
 Choose archetype:
 1: local -> project (project)
-Choose a number:  (1):
+Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ):  (1):
 +---
 
 Configuration

Modified: maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-multi-module-project.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-multi-module-project.apt?rev=1144700&r1=1144699&r2=1144700&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-multi-module-project.apt (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-multi-module-project.apt Sat Jul  9 16:36:44 2011
@@ -168,7 +168,7 @@ $ mvn archetype:generate -DarchetypeCata
 Choose archetype:
 1: local -> archetype (archetype)
 2: local -> archetype-archetype (archetype-archetype)
-Choose a number:  (1/2): 2
+Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ):  (1/2): 2
 Define value for groupId: : com.company
 Define value for artifactId: : project
 Define value for version:  1.0-SNAPSHOT: :

Modified: maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-with-property-file.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-with-property-file.apt?rev=1144700&r1=1144699&r2=1144700&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-with-property-file.apt (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/create-with-property-file.apt Sat Jul  9 16:36:44 2011
@@ -160,7 +160,7 @@ $ mvn archetype:generate -DarchetypeCata
 [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
 Choose archetype:
 1: local -> archetype-with-properties (archetype-with-properties)
-Choose a number:  (1): 1
+Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ):  (1): 1
 Define value for groupId: : foo
 Define value for artifactId: : bar
 Define value for version:  1.0-SNAPSHOT: :

Modified: maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt?rev=1144700&r1=1144699&r2=1144700&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt Sat Jul  9 16:36:44 2011
@@ -69,7 +69,7 @@ Choose archetype:
 1: http://cocoon.apache.org -> cocoon-22-archetype-block-plain (Creates an empty Cocoon block; useful if you want to add another block to a Cocoon application)
 2: http://cocoon.apache.org -> cocoon-22-archetype-block (Creates a Cocoon block containing some small samples)
 3: http://cocoon.apache.org -> cocoon-22-archetype-webapp (Creates a web application configured to host Cocoon blocks. Just add the block dependencies)
-Choose a number:  (1/2/3): 1
+Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ):  (1/2/3): 1
 Downloading: http://localhost:8081/nexus/content/groups/mac/org/apache/cocoon/cocoon-22-archetype-block-plain/1.0.0/cocoon-22-archetype-block-plain-1.0.0.jar
 13K downloaded
 Define value for groupId: : com.company

Modified: maven/archetype/trunk/maven-archetype-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/maven-archetype-plugin/src/site/apt/usage.apt?rev=1144700&r1=1144699&r2=1144700&view=diff
==============================================================================
--- maven/archetype/trunk/maven-archetype-plugin/src/site/apt/usage.apt (original)
+++ maven/archetype/trunk/maven-archetype-plugin/src/site/apt/usage.apt Sat Jul  9 16:36:44 2011
@@ -2,8 +2,9 @@
  Usage
  ------
  Raphaël Piéroni
+ Olivier Lamy
  ------
- 25 January 2008
+ 2011-07-09
  ------
 
 ~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -107,7 +108,7 @@ Choose archetype:
 34: internal -> maven-archetype-har (Hibernate Archive)
 35: internal -> maven-archetype-sar (JBoss Service Archive)
 36: internal -> wicket-archetype-quickstart (A simple Apache Wicket project)
-Choose a number:  (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36): 15
+Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ):  (1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/28/29/30/31/32/33/34/35/36): 15
 [INFO] artifact org.apache.maven.archetypes:maven-archetype-quickstart: checking for updates from maven-archetype-quickstart-repo
 Downloading: http://repo1.maven.org/maven2/org/apache/maven/archetypes/maven-archetype-quickstart/1.0/maven-archetype-quickstart-1.0.jar
 4K downloaded
@@ -163,6 +164,32 @@ project
 11 directories, 3 files
 +---
 
+Filtering to reduce archetype list
+
+  As of 2.1, you can reduce the list of displayed archetypes.
+  The filter use the following format [groupId:]artifactId.
+  If you use single word without : only artifactId will be check.
+  The filtering applyed is a case sensitive contains on the artifactId (and groupId if set)
+
+  Two options
+
+  With a mojo parameter
+
++---
+$ mvn archetype:generate -Dorg.apache:struts
+The diplayed list will contains only archetype with a groupId containing org.apache AND an artifactId containing struts
++---
+
+  Tru the prompter. Note if your filter doesn't find any archetype the previous list will be displayed again.
+
++---
+$ mvn archetype:generate
+.......
+The full list is displayed and in the prompt response you will be able to answer a filter
+Choose a number or apply filter (format : [groupId:]artifactId case sensitive contains ): org.apache:struts
+
++---
+
 Backward compatibility
 
     For backward compatibility with the Archetype Plugin version 1.0-alpha-7,