Author: rafale
Date: Wed Apr  9 13:36:53 2008
New Revision: 646522

URL: http://svn.apache.org/viewvc?rev=646522&view=rev
Log:
documented create-from-project specification

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

Modified: 
maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create-from-project.apt
URL: 
http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create-from-project.apt?rev=646522&r1=646521&r2=646522&view=diff
==============================================================================
--- 
maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create-from-project.apt
 (original)
+++ 
maven/archetype/trunk/archetype-plugin/src/site/apt/specification/create-from-project.apt
 Wed Apr  9 13:36:53 2008
@@ -29,72 +29,55 @@
 
 What is done during the creation of an archetype?
 
-~~TODO: add content
+* Property resolution
 
-+---
+    First the Archetype Plugin asks the user to provide the common properties' 
+    values (archetype.groupId, archetype.artifactId, archetype.version, 
groupId, 
+    artifactId, version, package).
 
-How to create an archetype?
-    The simple way: 
+    Then it asks for additional properties.
 
- mvn archetype:createFromProject
-    Configuring the plugin
-        -Darchetype.languages
-        -Darchetype.filteredExtensions
-        -Darchetype.phase=(package|install|deploy)
-        -Dpackage
-        -Darchetype.propertyFile
-        configuring the post generation goals and their associated properties
-        should be possible to configure the most of the plugin using a 
property file for automation
-    Beeing behind a proxy is automatically configured by Maven
-    Actual configuration 
+* Archetype creation
 
- @parameter default-value="false" boolean interactive; 
+    Using the project's directory as sources, the properties 
filteredExtensions 
+    and languages, the module tree; the Archetype Plugin search for revelant 
+    filesets indexed by module.
 
- @parameter expression="${archetype.filteredExtentions}" String 
archetypeFilteredExtentions; 
+    Using the revelant filesets, the module tree, the resolved properties; the 
+    Archetype Plugin creates the archetype's resources.
 
- @parameter expression="${archetype.languages}" String archetypeLanguages; 
+    Then it creates the archetype's descriptor using the the module tree, the 
+    revelant filesets, the resolved properties.
 
- @parameter expression="${user.home}/.m2/archetype.xml" File 
archetypeRegistryFile; 
+    Finishing by creating the pom for the archetype as a project.
 
- @parameter default-value="UTF-8" expression="${archetype.encoding}" String 
defaultEncoding; 
+* Archetype installation
 
- @parameter expression="${archetype.ignoreReplica}" boolean ignoreReplica = 
true; 
+    Optionally after creating the archetype, the Archetype Plugin installs the 
+    archetype in the local repository. And it updates the local catalog.
 
- @parameter expression="${archetype.partialArchetype}" boolean 
partialArchetype = false; 
+* Archetype deployment
 
- @parameter expression="${archetype.preserveCData}" boolean preserveCData = 
false; 
+    Optionally after installing the archetype, the Archetype Plugin deploys the
+    archetype in the remote repository.
 
- @parameter expression="${localRepository}" ArtifactRepository 
localRepository; 
+* Interactive mode
 
- @parameter expression="${archetype.keepParent}" boolean keepParent = true; 
+    The default behaviour is to operate in batch mode. The interactive mode is
+    optionally used.
 
- @parameter expression="${project}" MavenProject project; 
+* Advanced batch mode
 
- @parameter default-value="target/archetype.properties" 
expression="${archetype.properties}" File propertyFile; 
+    The additional properties in batch mode can only be defined using a 
property 
+    file. This file also can contain the other properties both the commons and 
+    the filteredExtensions and languages.
 
- @parameter expression="${basedir}/target" File outputDirectory; 
+* Fileset resolution
 
- @parameter expression="${testMode}" boolean testMode;
+    In each module's directory and excluding submodules trees, the Archetype 
+    Plugin sorts the files by languages, fileteredExtensions and sensible 
+    default base pathes (src/main/<languages>, src/main/<siblings>, 
+    src/test/<languages>, src/test/<siblings>, ...).
 
-+---
-
-+---
-3 ways to call cfp:
-  basic way: create the archetype from project in 
target/generated-sources/archetype/
-       and package archetype jar in target/
-  install way: same as basic plus copy the archetype jar in local repository
-       and update the local catalog
-  deploy way: same as install plus deploy the archetype jar in known 
deployment repository
-       and update the known deployment repository catalog
-    updating a local catalog:
-load the local catalog and construct a catalog
-  if the archetype is not in local catalog
-       => add it
-  else if the archetype is newer than in local catalog
-       => change the version and repository in local
-  else there is a problem because we install an older version
-    updating a remote catalog:
-dowload the remote catalog and construct a memory catalog
-same as for the local updating
-upload the modified catalog
-+---
+    This defines a tri-dimensional matrix. Each sorted group (matrix' cases) 
+    becomes a resolved fileset.


Reply via email to