maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raf...@apache.org
Subject svn commit: r627078 - in /maven/archetype/trunk/archetype-plugin/src/site/apt/specification: archetype-catalog.apt create.apt specification.apt
Date Tue, 12 Feb 2008 20:22:43 GMT
Author: rafale
Date: Tue Feb 12 12:22:39 2008
New Revision: 627078

URL: http://svn.apache.org/viewvc?rev=627078&view=rev
Log:
adding some specifications

Modified:
    maven/archetype/trunk/archetype-plugin/src/site/apt/specification/archetype-catalog.apt
    maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create.apt
    maven/archetype/trunk/archetype-plugin/src/site/apt/specification/specification.apt

Modified: maven/archetype/trunk/archetype-plugin/src/site/apt/specification/archetype-catalog.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/specification/archetype-catalog.apt?rev=627078&r1=627077&r2=627078&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/specification/archetype-catalog.apt
(original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/specification/archetype-catalog.apt
Tue Feb 12 12:22:39 2008
@@ -29,211 +29,90 @@
 
 How the Archetype Plugin know about archetype?
 
-~~TODO: add content
+    Knowledge about archetypes are stored in catalogs.
 
-+---
-Content of a catalog file
-    an xml file commonly named archetype-catalog.xml
-    <?xml ?> 
-
- <archetype-catalog> 
-
- 
-
- <archetype> 
-
- <groupId/> 
-
- <artifactId/> 
-
- 
-
- <repositoryUrl/> 
-
- <!-- optional when the file resides in a remote repository --> 
-
- 
-
- <goals> 
-
- <!-- list of goals called on a project after its generation from an archetype -->

-
- <!-- optional they whould reside in the archetype metadata file --> 
-
- <goal>clean:clean</goal> 
-
- </goals> 
-
- 
+    The catalogs are xml files.
 
- <properties> 
+    The Archetype Plugin comes bundled with an internal catalog. 
+    The one used by default.
 
- <!-- properties used in combination with the goals --> 
-
- <!-- should also reside in the archetype metadata --> 
-
- <property.name>property value</property.name> 
-
- </properties> 
-
- </archetype> 
-
- ... 
-
- </archetype-catalog>
+    The Archetype Plugin can use catalogs from local filesystem and from HTTP 
+    connexions.
 
+* Catalog file explained
 
+    Catalogs are xml file with such content:
 
 +---
-
-
-
-
-
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-catalog>
+  <archetypes>
+    <archetype>
+[1]    <groupId>org.appfuse.archetypes</groupId>
+[2]    <artifactId>appfuse-basic-jsf</artifactId>
+[3]    <version>2.0</version>
+[4]    <repository>http://static.appfuse.org/releases</repository>
+[5]    <description>AppFuse archetype for creating a web application with Hibernate,
Spring and JSF</description>
+    </archetype>
+    ...
+  </archetypes>
+</archetype-catalog>
 +---
-Selection behaviour
-    1. default behaviour 
-
- 
-
- prompt to select archetype from the internal catalog 
-
- check repository for latest RELEASE 
-
- use that release 
 
- 
+    [[1]] The groupId of the archetype. <<REQUIRED>>
 
- act as if -Darchetype.catalog=internal
-        case archetype is defined 
+    [[2]] The artifactId of the archetype. <<REQUIRED>>
 
- group artifact and version of archetype has values
-            if repository is defined
-                if archetype exists in repository
-                    use IT
-                else
-                    if interactive
-                        same as groupId and artifactId
-                    else FAIL
-            else
-                if archetype exist in one catalog
-                    use IT
-                if archetpe exists in more than one catalog
-                    use FIRST
-                else
-                    same as groupId and artifactId
-        case archetype is partially defined 
+    [[3]] The version of the archetype. <<<RELEASE>>> is a valid version.
<<REQUIRED>>
 
- group and artifact has values
-            if repository is defined
-                if archetype exists in repository
-                    select LATEST
-                else
-                    same as archetype not defined
-            else
-                if archetype exist in one catalog
-                    select LATEST
-                if archetype exist in more than one catalog
-                    select LATEST
-                esle
-                    same as archetype not defined
-        case archetype is not defined
-            get archetypes from defined catalogs 
+    [[4]] The repository where to find the archetype. <<OPTIONAL>>. When 
+          ommited, the archetype is searched in the repository where the catalog 
+          comes from.
 
- ask for one
-                select LATEST
-    2. choose version 
+    [[5]] The description of the archetype. <<OPTIONAL>>
+    
 
- 
+* Archetype selection explained
 
- prompt to select archetype from internal catalog 
+    During the creation of a project from an archetype, the Archetype Plugin
+    ask the user to choose an archetype from a list containing the archetypes
+    from each of the provided catalogs (Yes there may be many).
 
- check repository for all versions 
+    For each archetype in the list the Archetype Plugin shows a line like:
 
- prompt to select the version (one of the retrieved release versions(latest first), LATEST
or SNAPSHOT is allowed) 
-
- if SNAPSHOT is selected reprompt to select one of the retrieved snapshot versions (latest
first) 
-
- if LATEST is selected take the latest release version 
-
- use the selected archetype and version 
-
- 
-
- activated with -Darchetype.selectVersion=true or -Da.sv=true (for shorter)
-        any select LATEST
-            if interactive and selectVersion 
-
- get versions fromall repositories 
-
- ask for one version
-    3. use another catalog 
-
- 
-
- load the catalog from the remote source 
-
- then same behaviour as basic 
-
- 
-
- activated with -Darchetype.catalog=http://ip:port/path/file.xml 
-
- or with -Darchetype.catalog=http://ip:port/path (defauls to archetype-catalog.xml) 
-
- or with -Darchetype.catalog=remote (defaults to http://repo1.maven.org/maven2/archetype-catalog.xml)

-
- or with -Darchetype.catalog=file:///absolute/path/to/archetype-catalog.xml (no default file)

-
- 
-
- possible to combine with the -Darchetype.selectVersion property 
-
- 
-
- usage of proxy: handled by Maven in command line and in the IDE so all wagon download are
transparent to the archetype plugin 
-
- 
-
- alternative activation in combination with the ~/.m2/archetype-catalog.properties file 
-
- activation -Darchetype.catalog=name (name different from internal, remote or wiki) 
-
- then the catalog properties file must contains a line with name=http://ip:port/path (same
defaulting) 
-
- 
-
- remote catalogs and local catalog do not define repositoryUrls 
-
- in their archetypes' definition as this is obviously implied
-    4. use multiple catalogs 
-
- 
-
- load all defined catalogs separately 
-
- prompt to select archetype from those catalogs (without duplicates) 
++---
+1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with
Hibernate, Spring and JSF)
++---
 
- check in each repositories for versions and select the LATEST 
+    * <<<1:>>> The index of the archetype in the aggregated list (starting
from 
+      1).
 
- 
+    * <<<internal>>> The name of the catalog where the archetype is originating.
 
- activated with -Darchetype.catalog=internal,remote,wiki,http://ip:port/path (same defaulting)

+    * <<<appfuse-basic-jsf>>> The artifactId of the archetype
 
- 
+    * <<<(AppFuse archetype...)>>> The description of the archetype as
found in 
+      the catalog.
 
- possible to combine with -Darchetype.selectVersion
-    Archetype cataloger has methods 
 
- - getInternalCatalog/0 
+* Creating a catalog file
 
- ------ getWikiCatalog/0 
+    At the end of the <<<create-from-project>>> behaviour, the Archetype
Plugin
+    install/deploy the archetype, and update the local/remote catalog.
+    
+    The <<<crawl-repository>>> mojo is used to create a catalog file by
crawling 
+    a Maven 2 repository located in the filesystem. 
+    
+* Location of catalog files
 
- - getRemoteCatalog/0 /1(url) 
+    The Archetype Plugin knows by default its internal catalog. It also know 
+    about the <<<local>>> and <<<remote>>> catalogs.

 
- - getLocalCatalog/0 /1(path) 
+    <<<local>>> represents the catalog file <<<~/.m2/archetype-catalog.xml>>>.
 
- - updateLocalCatalog/2(achetype, path) 
+    <<<remote>>> represents the catalog file <<<http://repo1.maven.org/maven2/archetype-catalog.xml>>>.
 
- - updateRemoteCatalog/3 (archetype, url, credentials)
-+---
\ No newline at end of file
+    The Archetype Plugin can also read catalogs from filesystem/HTTP by 
+    providing the path/URL of a catalog file or of a directory contaings the
+    <<<archetype-catalog.xml>>> file.
+    
\ No newline at end of file

Modified: maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create.apt?rev=627078&r1=627077&r2=627078&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create.apt (original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create.apt Tue Feb 12
12:22:39 2008
@@ -30,6 +30,13 @@
 What is done during the creation of a project?
 
 ~~TODO: add content
+ * Archetype selection explained
+
+    During the creation of a project from an archetype, the Archetype Plugin
+    ask the user to choose an archetype from a list containing the archetypes
+    from each of the provided catalogs (Yes there may be many).
+
+    For each archetype in the list the selection 
 +---
 How to use an archetype?
     The simple way : 

Modified: maven/archetype/trunk/archetype-plugin/src/site/apt/specification/specification.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/specification/specification.apt?rev=627078&r1=627077&r2=627078&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/specification/specification.apt (original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/specification/specification.apt Tue
Feb 12 12:22:39 2008
@@ -40,10 +40,10 @@
 
     * {{{archetype-catalog.html}How the Archetype Plugin know about archetype?}}
 
-    * {{{create-from-project.html}What is done during the creation of an archetype?}}
-
-    * {{{update-catalog.html}How the Archetype Plugin know about new archetypes?}}
-
-    * {{{crawl-repository.html}How archetype lists are created?}}
+~~    * {{{create-from-project.html}What is done during the creation of an archetype?}}
+~~
+~~    * {{{update-catalog.html}How the Archetype Plugin know about new archetypes?}}
+~~
+~~    * {{{crawl-repository.html}How archetype lists are created?}}
     
     []



Mime
View raw message