Added: maven/sandbox/trunk/archetypeng/src/site/apt/archetypes.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/apt/archetypes.apt?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/apt/archetypes.apt (added) +++ maven/sandbox/trunk/archetypeng/src/site/apt/archetypes.apt Tue Aug 28 19:32:45 2007 @@ -0,0 +1,39 @@ + ----- + Archetypeng - Archetypes + ----- + The Maven Team + ----- + +Archetypes + + An archetype is a {{{#Descriptor}descriptor}} and a set of + {{{#Templates}templates}}. There is two kind of archetypes: complete and + partial. + + A complete archetype represents a Maven 2 project with complete features. + Eg. a class library, a desktop application, a web application. + + A partial archetype represents an added feature to an existing Maven 2 + project. Eg. using modello, using jetty. + + The archetype is packaged in a jar file. + + Archetypes can be created using the {{{creation.html}creation}} mecanism or + can be {{{archetype-handcraft.html}handcrafted}}. + +* {Descriptor} + + The archetype descriptor is an xml file defining: + + * the archetype name, + + * the properties needed by the templates, + + * the templates used to generate the project sorted by categories. + + [] + +* {Templates} + + The templates are velocity template files. They are used to generate the + sources of the project.
Added: maven/sandbox/trunk/archetypeng/src/site/apt/creation.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/apt/creation.apt?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/apt/creation.apt (added) +++ maven/sandbox/trunk/archetypeng/src/site/apt/creation.apt Tue Aug 28 19:32:45 2007 @@ -0,0 +1,256 @@ + ----- + Archetypeng - Creation + ----- + The Maven Team + ----- + +Creation + + Creating an archetype from a project involves two steps: + + * the configuration of the archetype + + * and the effective creation based on the collected information. + + [] + + At the end of these steps, you have a Maven 2 archetype created in the + target/generated-sources/archetypeng directory. + + It is possible to use the generation plugin in {{{#Batch}batch}} mode. + +* Archetype configuration + + During this step, you are successivly prompted to: + + * define the archetype's groupId, artifactId and version, + + * define the common properties' values (used for reverse templating), + + * define the archetype's properties and values (used for reverse templating), + + * confirm the configuration. + + [] + + A properety file containing the archetype definition and the archetype's + properties is written at the end of this step. + + The packageName property provides a default value of the guessed package of + the project based on the packages of the project's sources. + +* Archetype creation + + During this step, the plugin creates a Maven 2 archetype based on the + project's sources and pom and on the configuration collected. + + +* Example of use + + To create an archetype, call <mvn archetypeng:create-from-project>. + + ++-- [EMAIL PROTECTED] test-start]$ tree +. +|-- pom.xml +`-- src + |-- main + | `-- java + | `-- org + | `-- codehaus + | `-- mojo + | `-- archetypeng + | `-- test + | `-- start + | `-- App.java + `-- test + `-- java + `-- org + `-- codehaus + `-- mojo + `-- archetypeng + `-- test + `-- start + `-- AppTest.java + +17 directories, 3 files ++-- + + Here is a sample project (the one generated by the + {{{generation.html}generation}} :-)). + ++-- [EMAIL PROTECTED] test-start]$ mvn archetypeng:create-from-project +[INFO] Scanning for projects... +[INFO] Searching repository for plugin with prefix: 'archetypeng'. +[INFO] artifact org.codehaus.mojo:maven-archetypeng-plugin: checking for updates from central +[INFO] ---------------------------------------------------------------------------- +[INFO] Building test-start +[INFO] task-segment: [archetypeng:create-from-project] +[INFO] ---------------------------------------------------------------------------- +[INFO] Preparing archetypeng:create-from-project ++-- + + The first step of the creation: <configure-creation> + ++-- +[INFO] [archetypeng:configure-creation] +Define value for archetype.groupId: org.codehaus.mojo.archetypeng.test: : +Define value for archetype.artifactId: test-start-archetype: : +Define value for archetype.version: 1.0-SNAPSHOT: : +Define value for groupId: org.codehaus.mojo.archetypeng.test: : +Define value for artifactId: test-start: : +Define value for version: 1.0-SNAPSHOT: : ++-- + + Archetype definition (archetype.*) and common properties are defined using + the proposed default values. + ++-- +Add a new custom property Y: : Y +Define property key: aProperty +Define value for aProperty: : String searched in the sources +Add a new custom property Y: : N ++-- + + A custom property is added to the project creation. + ++-- +Confirm archetype configuration: +archetype.groupId: org.codehaus.mojo.archetypeng.test +archetype.artifactId: test-start-archetype +archetype.version: 1.0-SNAPSHOT +package: org.codehaus.mojo.archetypeng.test.start +version: 1.0-SNAPSHOT +groupId: org.codehaus.mojo.archetypeng.test +aProperty: String searched in the sources +artifactId: test-start + Y: : Y ++-- + + The archetype configuration is confirmed. + ++-- +[INFO] [archetypeng:create-archetype] ++-- + + The second step do the work without any comment. + ++-- +[INFO] [archetypeng:create-from-project] +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESSFUL +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 29 seconds +[INFO] Finished at: Mon Mar 12 19:09:52 CET 2007 +[INFO] Final Memory: 10M/24M +[INFO] ------------------------------------------------------------------------ ++-- + + The resuting project is created in the target directory. + ++-- [EMAIL PROTECTED] test-start]$ tree target/generated-sources/archetypeng +target/generated-sources/archetypeng +|-- pom.xml +`-- src + `-- main + `-- resources + |-- META-INF + | `-- maven + | `-- archetype.xml + `-- archetype-resources + |-- pom.xml + `-- src + |-- main + | `-- java + | `-- App.java + `-- test + `-- java + `-- AppTest.java + +11 directories, 5 files ++-- + +* {Batch} mode + + To enable the batch mode and remove the prompts, just run + <mvn archetypeng:create-from-project -B>. + + The batch mode wiil need the same answers as the interactive mode. These + answers are provided in a property file named archetype.properties in the + execution directory or set using the command line property + <-Darchetype.properties=path/to/archetype.properties>. + + Here is an example of archetype.properties file (the one generated by the + interactive creation :-)). + ++-- [EMAIL PROTECTED] test-start]$ cat archetype.properties +# +#Mon Mar 12 19:09:51 CET 2007 +version=1.0-SNAPSHOT +package=org.codehaus.mojo.archetypeng.test.start +archetype.groupId=org.codehaus.mojo.archetypeng.test +archetype.artifactId=test-start-archetype +groupId=org.codehaus.mojo.archetypeng.test +artifactId=test-start +archetype.version=1.0-SNAPSHOT ++-- + + Here is the plugin execution. + ++-- [EMAIL PROTECTED] test-start]$ tree +. +|-- archetype.properties +|-- pom.xml +`-- src + |-- main + | `-- java + | `-- org + | `-- codehaus + | `-- mojo + | `-- archetypeng + | `-- test + | `-- start + | `-- App.java + `-- test + `-- java + `-- org + `-- codehaus + `-- mojo + `-- archetypeng + `-- test + `-- start + `-- AppTest.java + +17 directories, 4 files ++-- + + Ensure the property file exists. + ++-- [EMAIL PROTECTED] test-start]$ mvn archetypeng:create-from-project -B +[INFO] Scanning for projects... +[INFO] Searching repository for plugin with prefix: 'archetypeng'. +[INFO] artifact org.codehaus.mojo:maven-archetypeng-plugin: checking for updates from central +[INFO] ---------------------------------------------------------------------------- +[INFO] Building test-start +[INFO] task-segment: [archetypeng:create-from-project] +[INFO] ---------------------------------------------------------------------------- +[INFO] Preparing archetypeng:create-from-project +[INFO] [archetypeng:configure-creation] +[INFO] [archetypeng:create-archetype] +[INFO] [archetypeng:create-from-project] +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESSFUL +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 16 seconds +[INFO] Finished at: Mon Mar 12 19:13:22 CET 2007 +[INFO] Final Memory: 10M/24M +[INFO] ------------------------------------------------------------------------ ++-- + + The project tree is the same as in the interactive mode. Added: maven/sandbox/trunk/archetypeng/src/site/apt/design.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/apt/design.apt?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/apt/design.apt (added) +++ maven/sandbox/trunk/archetypeng/src/site/apt/design.apt Tue Aug 28 19:32:45 2007 @@ -0,0 +1,129 @@ + ----- + Archetypeng - Design + ----- + The Maven Team + ----- + +Design + + The archetypeng plugin is built upon a stack. + + The top most elements are the {{{mojos.html}mojos}}, among them two are + mojos invoking a custom lifecycle on which are binded the inner mojos. + + The inner mojos calls the top most components which perform the algorithm + of there task and delegate some task to inner components. + +Mojos + + The generate mojo calls select-archetype, configure-generation and + generate-archetype in a lifecycle. + + The create mojo calls configure-creation and create-project in a lifecycle. + + The clean mojo performs his task without an inner mojo nor a plexus + component. + + The select-archetype mojo is the inner mojo which delegates its task to the + ArchetypeSelector plexus component. + + The configure-generation mojo is the inner mojo which delegates its task to + the ArchetypeGenerationConfigurator plexus component. + + The generate-project mojo is the inner mojo which delegates its task to the + ArchetypeGenerator plexus component. + + The configure-creation mojo is the inner mojo which delegates its task to + the ArchetypeCreationConfigurator plexus component. + + The create-archetype mojo is the inner mojo which delegates its task to the + ArchetypeCreator plexus component. + +Main components + + The main plexus components of the plugin are the components dirrectly called + by the mojos. + + They are ArchetypeSelector, ArchetypeGenerationConfigurator, + ArchetypeGenerator, ArchetypeCreationConfigurator, ArchetypeCreator. + + The ArchetypeSelector component perform the algorithm of the selection step + in the project generation. + To performs this task, it uses the ArchetypeArtifactManager, + ArchetypeFactory, ArchetypePropertiesManager, ArchetypeRegistryManager, + ArchetypeSelectionQueryer components. + + The ArchetypeGenerationConfigurator component performs the algorithm of the + configuration step in the project generation. + To perform this task, it uses the ArchetypeArtifactManager, + ArchetypeFactory, ArchetypeGenerationQueryer, ArchetypePropertiesManager + components. + + The ArchetypeGenerator component performs the algorithm of the generation + step in the project generation. + To perform this task, it uses the ArchetypeArtifactManager, + ArchetypeFactory, ArchetypePathResolver, ArchetypePropertiesManager, + PomManager, VelocityComponent components. + + The ArchetypeCreationConfigurator component performs the algorithm of the + configuration step of the archetype creation. + To perfom this task, it uses the ArchetypeCreationQueryer, ArchetypeFactory, + ArchetypePropertiesManager, ArchetypeTemplateResolver components. + + The ArchetypeCreator component performs the algorithm of the creation step + in the archetype creation. + to perfom this task, it uses the ArchetypeFactory, ArchetypePathResolver, + ArchetypePropertiesManager, ArchetypeTemplateResolver, PomManager + components. + +Queryer components + + This kind of component is the one in charge with the interaction with the + user during the selection and configuration steps of the generation and + during the configuration step of the creation. + + The ArchetypeSelectionQueryer component asks all the questions of the + selection step of the generation. + It asks to select the group, the archetype, the version and to confirm the + selection. + + The ArchetypeGenerationQueryer component asks all the questions of the + configuration step of the selection. + It asks to provide a value for a property and to confirm the configuration. + + The ArchetypeCreationQueryer component asks all the questions of the + configuration step of the creation. + Its asks to provide values for the archetype definition (3 questions), to + provide values for the common properties (4 questions), to provide the + keys and values for a specific property (2 question), if a new specific + property is desired and to confirm the configuration. + +Common components. + + They are components which provides usefull method helping the main component + to perform their tasks. + + The ArchetypeArtifactManager component performs all the interaction with the + repositories and gives the descriptor and classloader from which the + generation reads the templates. + + ArchetypeFactory component construct the ArchetypeDefinition and the + ArchetypeConfiguration objects. + + ArchetypePathResolver component resolves the pathes of the templates in the + archetype archive, the pathes of the generated project files. + + ArchetypePropertiesManager component performs the actions which use the + archetype.properties file. + + ArchetypeRegistryManager component performs the actions which interact with + the registry file (located in ~/.m2/archetype.xml). That file holds the + archetypeGroup list. + + ArchetypeTemplateResolver component find the potential templates in a + directory, sort the templates in site sources or resources, resolve a common + package from a list of sources templates. + + PomManager components perfroms the actions of reading and writing pom files + and modify the poms by adding modules, adding parent or merging two poms. + Added: maven/sandbox/trunk/archetypeng/src/site/apt/generation.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/apt/generation.apt?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/apt/generation.apt (added) +++ maven/sandbox/trunk/archetypeng/src/site/apt/generation.apt Tue Aug 28 19:32:45 2007 @@ -0,0 +1,281 @@ + ----- + Archetypeng - Generation + ----- + The Maven Team + ----- + +Generation + + Generating a project from an archetype involves three steps: + + * the selection of the archetype, + + * the configuration of that archetype, + + * the effective generation of the project based on the collected information. + + [] + + At the end of these steps, you have a Maven 2 project generated in a + defined directory. + + It is possible to use the generation plugin in {{{#Batch}batch}} mode. + +* Archetype selection + + During this step, you are successivly prompted to: + + * select the group the archetype belongs to, + + * select the archetype you want to use, + + * select the version of that archetype, + + * confirm the selection. + + [] + + A property file containing the archetype definition is written at the end of + this step. + + The list of archetypes and versions are retrieved from the Maven + repositories. The list of groups is retrieved using default values and a + registry file. + +* Archetype configuration + + During this step, you are successivly prompted to: + + * define each of the common properties (project's groupId, artifactId, + version and packageName), + + * define each of the archetype required properties, + + * confirm the configuration. + + [] + + The property file containing the archetype definition is enhanced with the + configuration at the end of this step. + +* Project generation + + During this step, the plugin generates the project based on the archetype + choosen and the configuration defined. + +* Example of use + + To generate a project, call <mvn archetypeng:create>. + ++-- [EMAIL PROTECTED] test]$ tree +. + +0 directories, 0 files ++-- + + Ensuring an empty directory. + ++-- [EMAIL PROTECTED] test]$ mvn archetypeng:create +[INFO] Scanning for projects... +[INFO] Searching repository for plugin with prefix: 'archetypeng'. +[INFO] artifact org.codehaus.mojo:maven-archetypeng-plugin: checking for updates from central +[INFO] ---------------------------------------------------------------------------- +[INFO] Building Maven Default Project +[INFO] task-segment: [archetypeng:create] (aggregator-style) +[INFO] ---------------------------------------------------------------------------- +[INFO] Preparing archetypeng:create +[INFO] [archetypeng:select-archetype] ++-- + + The first step of the generation: <select-archetype> + ++-- +Choose group: +1: org.apache.maven.archetypes +2: org.codehaus.mojo.archetypes +Choose a number: (1/2): 2 ++-- + + The <org.codehaus.mojo.archetypes> group is choosen. + ++-- +[INFO] org.codehaus.mojo.archetypes: checking for updates from central +Choose archetype: +1: Starting Archetype (org.codehaus.mojo.archetypes:maven-archetypeng-start) +2: Archetype Archetype (org.codehaus.mojo.archetypes:maven-archetypeng-archetype) +3: Plugin Archetype (org.codehaus.mojo.archetypes:maven-archetypeng-maven-plugin) +4: Site Archetype (org.codehaus.mojo.archetypes:maven-archetypeng-site) +Choose a number: (1/2/3/4): 1 ++-- + + The <Starting Archetype> is choosen + ++-- +[INFO] org.codehaus.mojo.archetypes.maven-archetypeng-start: checking for updates from central +Choose version: +1: 1.0-SNAPSHOT +Choose a number: (1): 1 ++-- + + The <1.0-SNAPSHOT> version is choosen. + ++-- +Confirm archetype selection: +org.codehaus.mojo.archetypes/Starting Archetype + (Y/N) Y: : Y ++-- + + The selection is confirmed. + ++-- +[INFO] [archetypeng:configure-generation] ++-- + + The second step of the generation: <configure-generation> + ++-- +Define value for groupId: : org.codehaus.mojo.archetypeng.test +Define value for artifactId: : test-start +Define value for version: : 1.0-SNAPSHOT +Define value for package: : org.codehaus.mojo.archetypeng.test.start ++-- + + Each of the common properties are answered. + ++-- +Confirm properties configuration: +groupId: org.codehaus.mojo.archetypeng.test +artifactId: test-start +version: 1.0-SNAPSHOT +package: org.codehaus.mojo.archetypeng.test.start + Y: : Y ++-- + + The archetype configuration is confirmed. + ++-- +[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. +[INFO] Setting property: velocimacro.messages.on => 'false'. +[INFO] Setting property: resource.loader => 'classpath'. +[INFO] Setting property: resource.manager.logwhenfound => 'false'. ++-- + + The third step loads velocity. + ++-- +[INFO] [archetypeng:generate-project] ++-- + + The third step do the work without any comment. + ++-- +[INFO] [archetypeng:create] +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESSFUL +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 2 minutes 8 seconds +[INFO] Finished at: Sun Mar 11 22:11:28 CET 2007 +[INFO] Final Memory: 10M/25M +[INFO] ------------------------------------------------------------------------ ++-- + + The resuting project is generated in a directory named with the artifactId + property answered. + ++-- [EMAIL PROTECTED] test]$ tree +archetype.properties test-start/ [EMAIL PROTECTED] test]$ tree test-start +test-start +|-- pom.xml +`-- src + |-- main + | `-- java + | `-- org + | `-- codehaus + | `-- mojo + | `-- archetypeng + | `-- test + | `-- start + | `-- App.java + `-- test + `-- java + `-- org + `-- codehaus + `-- mojo + `-- archetypeng + `-- test + `-- start + `-- AppTest.java + +17 directories, 3 files ++-- + +* {Batch} mode + + To enable the batch mode and remove the prompts, just run + <mvn archetypeng:generate -B>. + + The batch mode wiil need the same answers as the interactive mode. These + answers are provided in a property file named archetype.properties in the + execution directory or set using the command line property + <-Darchetype.properties=path/to/archetype.properties>. + + Here is an example of archetype.properties file (the one generated by the + interactive generation :-)). + ++-- [EMAIL PROTECTED] test]$ cat archetype.properties +# +#Sun Mar 11 22:11:28 CET 2007 +archetype.artifactId=maven-archetypeng-start +archetype.groupId=org.codehaus.mojo.archetypes +archetype.version=1.0-SNAPSHOT +groupId=org.codehaus.mojo.archetypeng.test +artifactId=test-start +version=1.0-SNAPSHOT +package=org.codehaus.mojo.archetypeng.test.start ++-- + + Here is the plugin execution. + ++-- [EMAIL PROTECTED] test]$ tree +. +`-- archetype.properties + +0 directories, 1 file ++-- + + Ensure the property file exists. + ++-- [EMAIL PROTECTED] test]$ mvn archetypeng:create -B +[INFO] Scanning for projects... +[INFO] Searching repository for plugin with prefix: 'archetypeng'. +[INFO] ---------------------------------------------------------------------------- +[INFO] Building Maven Default Project +[INFO] task-segment: [archetypeng:create] (aggregator-style) +[INFO] ---------------------------------------------------------------------------- +[INFO] Preparing archetypeng:create +[INFO] [archetypeng:select-archetype] +[INFO] Archetype selected (org.codehaus.mojo.archetypes:maven-archetypeng-start:1.0-SNAPSHOT) +[INFO] [archetypeng:configure-generation] +[INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'. +[INFO] Setting property: velocimacro.messages.on => 'false'. +[INFO] Setting property: resource.loader => 'classpath'. +[INFO] Setting property: resource.manager.logwhenfound => 'false'. +[INFO] [archetypeng:generate-project] +[INFO] [archetypeng:create] +[INFO] ------------------------------------------------------------------------ +[INFO] BUILD SUCCESSFUL +[INFO] ------------------------------------------------------------------------ +[INFO] Total time: 5 seconds +[INFO] Finished at: Sun Mar 11 23:07:53 CET 2007 +[INFO] Final Memory: 10M/27M +[INFO] ------------------------------------------------------------------------ ++-- + + The project tree is the same as in the interactive mode. Added: maven/sandbox/trunk/archetypeng/src/site/apt/main.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/apt/main.apt?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/apt/main.apt (added) +++ maven/sandbox/trunk/archetypeng/src/site/apt/main.apt Tue Aug 28 19:32:45 2007 @@ -0,0 +1,42 @@ + ----- + Archetypeng - Main + ----- + The Maven Team + ----- + +Purpose + + The purpose of this plugin is to provide the mecanism to + {{{generation.html}create}} a sample project from an + {{{archetypes.html}archetype}} and to {{{creation.html}create-from-project}} an archetype + from an existing project. + +Quickstart + + There is two way of using the archetype plugin: + + * call <<<mvn archetypeng:{{{generation.html}create}}>>> for project + generation from an archetype. To avoid console prompts and only use a + property file, add <<<-B>>> option. + + * call <<<mvn archetypeng:{{{creation.html}create-from-project}}>>> in a project directory + for archetype creation. To avoid console prompts and only use a property + file, add <<<-B>>> option. + + [] + +Table of content + + [[1]] {{{generation.html}Generation}} of a project. + + [[1]] {{{creation.html}Creation}} of an archetype. + + [[1]] What are {{{archetypes.html}archetypes}} ? + + [[1]] {{{mojos.html}Mojos}} of the plugin. + + [[1]] How to {{{archetype-handcraft.html}handcraft}} archetypes ? + + [[1]] Archetypeng {{{design.html}design}} for developers. + + [] Added: maven/sandbox/trunk/archetypeng/src/site/apt/mojos.apt URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/apt/mojos.apt?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/apt/mojos.apt (added) +++ maven/sandbox/trunk/archetypeng/src/site/apt/mojos.apt Tue Aug 28 19:32:45 2007 @@ -0,0 +1,87 @@ + ----- + Archetypeng - Mojos + ----- + The Maven Team + ----- + +Mojos + + The two main mojos of the plugin are: + + * generate which generates a Maven 2 project from an archetype. It wraps up + a lifecycle around the three mojos select-archetype, configure-generation + and generate-project. + For a complete example see {{{generation.html}generation}}. + + * create which creates an archetype from a Maven 2 project. It wraps up a + lifecycle around the two mojos configure-creation and create-archetype. + + [] + + The other mojos of the plugin are: + + * clean which removes the archetype.properties file used by both the + generation of a project and the creation of an archetype. + + * select-archetype performs the first step of the generation. + + It first asks for a plugin group, looks up in the repository for + archetypes of that group. + + Then it asks for an archetype, looks up in the repository for versions of + that archetype. + + Then is asks for a version and asks for the confirmation of the selection. + + At the end, it stores the selection in the archetype.properties file. + + * configure-generation performs the second step of the generation. + + It first asks values for each of the common properties. + + It then asks values for each of the archtype's properties which don't + provide default values. + + It then asks for the confirmation of the configuration. + + At the end, it stores the configuration in the archetype.properties file. + + * generate-project performs the third and last step of the generation. + + It reads the configuration from the property file. + + Then it generates all the project files from the choosen archetype's + templates and the configuration. + + The project files are generated in a directory named from the artifactId + common property. + + * configure-creation performs the first step of the creation. + + It first asks for the archetype definition (groupId, artifactId, version). + + It then asks for the values of the common properties. It provides + meaningfull defaults. + + It then ask for some specific properties in two questions: first the name + of the property and second the value of that property. + + It the asks for the confirmation of the configuration. + + At the end, it stores the definition and configuration in the + archetype.properties file. + + * create-archetype performs the second and last step of the creation. + + It reads the definition and the configuratino from the property file. + + Then it creates all the templates of the archetype from the project + sources files. + + Then it creates the descriptor of the archetype from the configuration and + the resolved templates. + + The resulting archetype Maven 2 project is created in the + target/generate-sources/archetypeng directory. + + [] Added: maven/sandbox/trunk/archetypeng/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/archetypeng/src/site/site.xml?rev=570611&view=auto ============================================================================== --- maven/sandbox/trunk/archetypeng/src/site/site.xml (added) +++ maven/sandbox/trunk/archetypeng/src/site/site.xml Tue Aug 28 19:32:45 2007 @@ -0,0 +1,27 @@ +<project name="Mojo"> + <bannerLeft> + <name>Mojo</name> + <src>http://mojo.codehaus.org/images/mojo_logo.png</src> + <href>http://mojo.codehaus.org</href> + </bannerLeft> + <bannerRight> + <name>Codehaus</name> + <src>http://mojo.codehaus.org/images/codehaus-small.png</src> + <href>http://www.codehaus.org</href> + </bannerRight> + <body> + <menu name="Mojo"> + <item name="mojo" href="http://mojo.codehaus.org"/> + </menu> + <menu name="Documentation"> + <item name="Introduction to archetype plugin" href="./main.html"/> + <item name="What are archetypes ?" href="./archetypes.html"/> + <item name="Project Generation" href="./generation.html"/> + <item name="Archetype Creation" href="./creation.html"/> + <item name="Handcrafting archetypes" href="./archetype-handcraft.html"/> + <item name="Mojos of the plugin" href="./mojos.html"/> + <item name="Desing of the Archetypeng plugin" href="./design.html"/> + </menu> + ${reports} + </body> +</project> \ No newline at end of file