You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ra...@apache.org on 2008/02/25 22:40:25 UTC
svn commit: r631007 [1/2] - in /maven/archetype/trunk: archetype-site/
archetype-site/src/ archetype-site/src/site/ archetype-site/src/site/apt/
archetype-site/src/site/apt/examples/
archetype-site/src/site/apt/old_documentation/ archetype-site/src/sit...
Author: rafale
Date: Mon Feb 25 13:40:20 2008
New Revision: 631007
URL: http://svn.apache.org/viewvc?rev=631007&view=rev
Log:
move documentation to site module
Added:
maven/archetype/trunk/archetype-site/ (with props)
maven/archetype/trunk/archetype-site/nbactions.xml (with props)
maven/archetype/trunk/archetype-site/pom.xml (with props)
maven/archetype/trunk/archetype-site/src/
maven/archetype/trunk/archetype-site/src/site/
maven/archetype/trunk/archetype-site/src/site/apt/
maven/archetype/trunk/archetype-site/src/site/apt/advanced-usage.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/examples/
maven/archetype/trunk/archetype-site/src/site/apt/examples/create-alternative-catalog.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/examples/create-basic.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/examples/create-batch.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-basic.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-deploy.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/index.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetype-handcraft.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetypes.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/creation.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/design.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/generation.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/main.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/mojos.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/
maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-catalog.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-metadata.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/crawl-repository.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/create-from-project.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/generate.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/specification.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/specification/update-catalog.apt (with props)
maven/archetype/trunk/archetype-site/src/site/apt/usage.apt (with props)
maven/archetype/trunk/archetype-site/src/site/site.xml (with props)
Removed:
maven/archetype/trunk/src/site/apt/advanced-usage.apt
maven/archetype/trunk/src/site/apt/examples/create-alternative-catalog.apt
maven/archetype/trunk/src/site/apt/examples/create-basic.apt
maven/archetype/trunk/src/site/apt/examples/create-batch.apt
maven/archetype/trunk/src/site/apt/examples/create-from-project-basic.apt
maven/archetype/trunk/src/site/apt/examples/create-from-project-deploy.apt
maven/archetype/trunk/src/site/apt/index.apt
maven/archetype/trunk/src/site/apt/old_documentation/archetype-handcraft.apt
maven/archetype/trunk/src/site/apt/old_documentation/archetypes.apt
maven/archetype/trunk/src/site/apt/old_documentation/creation.apt
maven/archetype/trunk/src/site/apt/old_documentation/design.apt
maven/archetype/trunk/src/site/apt/old_documentation/generation.apt
maven/archetype/trunk/src/site/apt/old_documentation/main.apt
maven/archetype/trunk/src/site/apt/old_documentation/mojos.apt
maven/archetype/trunk/src/site/apt/specification/archetype-catalog.apt
maven/archetype/trunk/src/site/apt/specification/archetype-metadata.apt
maven/archetype/trunk/src/site/apt/specification/archetype.apt
maven/archetype/trunk/src/site/apt/specification/crawl-repository.apt
maven/archetype/trunk/src/site/apt/specification/create-from-project.apt
maven/archetype/trunk/src/site/apt/specification/generate.apt
maven/archetype/trunk/src/site/apt/specification/specification.apt
maven/archetype/trunk/src/site/apt/specification/update-catalog.apt
maven/archetype/trunk/src/site/apt/usage.apt
maven/archetype/trunk/src/site/site.xml
Propchange: maven/archetype/trunk/archetype-site/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Feb 25 13:40:20 2008
@@ -0,0 +1 @@
+target
Added: maven/archetype/trunk/archetype-site/nbactions.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/nbactions.xml?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/nbactions.xml (added)
+++ maven/archetype/trunk/archetype-site/nbactions.xml Mon Feb 25 13:40:20 2008
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<actions>
+ <action>
+ <actionName>CUSTOM-site-stage</actionName>
+ <displayName>site-stage</displayName>
+ <goals>
+ <goal>site:stage-deploy</goal>
+ </goals>
+ <activatedProfiles>
+ <activatedProfile>release-at-apache</activatedProfile>
+ </activatedProfiles>
+ </action>
+ </actions>
Propchange: maven/archetype/trunk/archetype-site/nbactions.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/pom.xml
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/pom.xml?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/pom.xml (added)
+++ maven/archetype/trunk/archetype-site/pom.xml Mon Feb 25 13:40:20 2008
@@ -0,0 +1,70 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>maven-archetype</artifactId>
+ <groupId>org.apache.maven.archetype</groupId>
+ <version>2.0-alpha-3-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>archetype-site</artifactId>
+ <packaging>pom</packaging>
+ <name>Maven Archetype</name>
+ <url>http://maven.apache.org/archetype</url>
+ <inceptionYear>2001</inceptionYear>
+ <distributionManagement>
+ <site>
+ <id>apache.website</id>
+ <url>scpexe://people.apache.org/www/maven.apache.org/archetype</url>
+ </site>
+ </distributionManagement>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.wagon</groupId>
+ <artifactId>wagon-ssh-external</artifactId>
+ <version>1.0-alpha-5</version>
+ </extension>
+ </extensions>
+ </build>
+
+ <reporting>
+ <excludeDefaults>true</excludeDefaults>
+ <!-- TODO: disable dependencies -->
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <configuration>
+ <checkoutDirectoryName>maven-archetype</checkoutDirectoryName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <!-- repeated here so that maven-site is not appended -->
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/archetype/trunk/</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/archetype/trunk/</developerConnection>
+ <url>http://svn.apache.org/viewcvs.cgi/maven/archetype/trunk/</url>
+ </scm>
+</project>
Propchange: maven/archetype/trunk/archetype-site/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/advanced-usage.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/advanced-usage.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/advanced-usage.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/advanced-usage.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,151 @@
+ ------
+ Advanced Usage
+ ------
+ Raphaël Piéroni
+ ------
+ 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+Archetype creation
+
+ Creating an archetype from an existing project involves three steps :
+
+ * the archetype resolution
+
+ * the archetype installation:deployment
+
+ * the archetype usage
+
+ []
+
+
+Usage
+
+ Calling <<<mvn archetype:create-from-project>>> the plugin first resolves
+ the package by guessing the project directory.
+
+ It then generates the directory tree of the archetype in the
+ <<<target/generated-sources/archetype>>> directory.
+
++---
+mvn archetype:create-from-project
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building project
+[INFO] task-segment: [archetype:create-from-project]
+[INFO] ------------------------------------------------------------------------
+[INFO] Preparing archetype:create-from-project
+[INFO] No goals needed for project - skipping
+[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] [archetype:create-from-project]
+[INFO] Setting default archetype's groupId: com.company
+[INFO] Setting default archetype's artifactId: project
+[INFO] Setting default archetype's version: 1.0-SNAPSHOT
+[INFO] Setting default groupId: com.company
+[INFO] Setting default artifactId: project
+[INFO] Setting default version: 1.0-SNAPSHOT
+[INFO] Setting default package: com.company.project
+[INFO] Archetype created in target/generated-sources/archetype
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 4 seconds
+[INFO] Finished at: Fri Feb 22 21:49:52 GMT 2008
+[INFO] Final Memory: 10M/26M
+[INFO] ------------------------------------------------------------------------
++---
+
+ Then move to that generated directory and call <<<mvn install>>> on the
+ created archetype.
+
++---
+$ cd target/generated-sources/archetype/
+$ mvn install
+[INFO] Scanning for projects...
+[INFO] ------------------------------------------------------------------------
+[INFO] Building project
+[INFO] task-segment: [install]
+[INFO] ------------------------------------------------------------------------
+[INFO] [resources:resources]
+[INFO] Using default encoding to copy filtered resources.
+[INFO] [resources:testResources]
+[INFO] Using default encoding to copy filtered resources.
+[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] [archetype:jar]
+[INFO] [archetype:add-archetype-metadata]
+[INFO] [archetype:integration-test]
+[INFO] [install:install]
+[INFO] Installing /home/local/rafale/projects/tmp/project/target/generated-sources/archetype/target/project-1.0-SNAPSHOT.jar to /home/rafale/.m2/repository/com/company/project/1.0-SNAPSHOT/project-1.0-SNAPSHOT.jar
+[INFO] [archetype:update-local-catalog]
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 10 seconds
+[INFO] Finished at: Fri Feb 22 21:51:57 GMT 2008
+[INFO] Final Memory: 14M/35M
+[INFO] ------------------------------------------------------------------------
++---
+
+ Finally move to a fresh directory and use your archetype.
+
++---
+$ mkdir /tmp/archetype
+$ cd /tmp/archetype
+$ mvn archetype:generate -DarchetypeCatalog=local
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Default Project
+[INFO] task-segment: [archetype:generate] (aggregator-style)
+[INFO] ------------------------------------------------------------------------
+[INFO] Preparing archetype:generate
+[INFO] No goals needed for project - skipping
+[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] [archetype:generate]
+Choose archetype:
+1: local -> project (project)
+Choose a number: (1):
++---
+
+Configuration
+
+ The <<<create-from-project>>> mojo enable the user to provide some sensible
+ configuration using the system properties or a property file.
+
+ The system properties permits the user to define the groupId, artifactId,
+ version of the created archetype. They also permits to override the resolved
+ package and to create a partial archetype.
+
+ When used, the property file takes precedence on the system properties.
+ It is also the only way to define additional properties in the archetype.
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/advanced-usage.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-alternative-catalog.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/examples/create-alternative-catalog.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/examples/create-alternative-catalog.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/examples/create-alternative-catalog.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,28 @@
+ ------
+ XXXXXXX
+ ------
+ Raphaël Piéroni
+ ------
+ 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-alternative-catalog.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-basic.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/examples/create-basic.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/examples/create-basic.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/examples/create-basic.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,28 @@
+ ------
+ XXXXXXX
+ ------
+ Raphaël Piéroni
+ ------
+ 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-basic.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-batch.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/examples/create-batch.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/examples/create-batch.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/examples/create-batch.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,79 @@
+ ------
+ Create project in batch mode
+ ------
+ Raphaël Piéroni
+ ------
+ 04 February 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+ * Create project in batch mode
+
+ It is possible to get rid of the interactivity of the archetype plugin
+ by defining the <<<archetype.interactive>>> property to <<<false>>>.
+ A couple of meaningfull properties are the required.
+
+ The archetypeGroupId, archetypeArtifactId and archetypeVersion defines the
+ archetype to use for project creation.
+
+ The groupId, artifactId, version and package are the main properties to be
+ set. Each archetype require these properties. Some archetypes defines other
+ properties; refers to the appropriate archetype documentation if needed.
+
+
++--
+$ mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -Darchetype.interactive=false -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.0 -DgroupId=com.company -DartifactId=project -Dversion=1.0 -Dpackage=1.5
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] ------------------------------------------------------------------------
+[INFO] Building Maven Default Project
+[INFO] task-segment: [archetype:create] (aggregator-style)
+[INFO] ------------------------------------------------------------------------
+[INFO] Preparing archetype:create
+[INFO] No goals needed for project - skipping
+Downloading: http://repo1.maven.org/maven2/com/company/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom
+Downloading: http://repo1.maven.org/maven2/com/company/wagon-http-shared/1.0-beta-2/wagon-http-shared-1.0-beta-2.pom
+[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] [archetype:create]
+[INFO] Archetype repository missing. Using the one from [org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE -> http://repo1.maven.org/maven2] found in catalog internal
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating OldArchetype: maven-archetype-quickstart:1.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.company
+[INFO] Parameter: packageName, Value: 1.5
+[INFO] Parameter: package, Value: 1.5
+[INFO] Parameter: artifactId, Value: project
+[INFO] Parameter: basedir, Value: /home/local/rafale/projects/tmp
+[INFO] Parameter: version, Value: 1.0
+[INFO] ********************* End of debug info from resources from generated POM ***********************
+[INFO] OldArchetype created in dir: /home/local/rafale/projects/tmp/project
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 6 seconds
+[INFO] Finished at: Mon Feb 04 19:56:03 GMT 2008
+[INFO] Final Memory: 10M/25M
+[INFO] ------------------------------------------------------------------------
++--
\ No newline at end of file
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-batch.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-basic.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-basic.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-basic.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-basic.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,30 @@
+ ------
+ XXXXXXX
+ ------
+ Raphaël Piéroni
+ ------
+ 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-basic.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-deploy.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-deploy.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-deploy.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-deploy.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,29 @@
+ ------
+ XXXXXXX
+ ------
+ Raphaël Piéroni
+ ------
+ 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/examples/create-from-project-deploy.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/index.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/index.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/index.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,89 @@
+ ------
+ Introduction
+ ------
+ Raphaël Piéroni
+ ------
+ 25 January 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+Maven 2 Archetype Plugin
+
+ The Archetype Plugin allows the user to create a Maven 2 project
+ from an existing template called an archetype.
+
+ It also allows the user to create an archetype from an existing project.
+ (<currently under development>)
+
+
+* Usage
+
+ {{{usage.html}Instructions on how to use the Archetype Plugin to create a project}}
+ can be found on the usage page.
+
+ The Archetype Plugin is embedded in IDE {{{#}eclipse}}, {{{#}netbeans}},
+ {{{#}idea}}.
+
+ {{{advanced-usage.html}Instruction on how to use the Archetype Plugin to create an archetype from an existing project}}
+ can be found on the advanced usage page.
+
+
+* Goals Overview
+
+ The archetype plugin has two goals:
+
+ * {{{archetype-plugin/create-mojo.html}archetype:create}} creates a Maven 2 project from an
+ archetype. It use the behaviour of the Archetype plugin Version 1.0-alpha-7.
+
+ * {{{archetype-plugin/generate-mojo.html}archetype:generate}} ask the user to choose an archetype
+ from the archetype catalog, and retrieves it from the remote repository.
+ Once retrieved, it is processed to create a working Maven project.
+
+ * {{{archetype-plugin/create-from-project-mojo.html}archetype:create-from-project}} creates
+ an archetype from an existing project.
+
+ * {{{archetype-plugin/crawl-repository-mojo.html}archetype:crawl-repository}} search a repository
+ for archetype and updates a catalog.
+
+ []
+
+
+* Examples
+
+ The following examples show how to use the Archetype Plugin in more advanced
+ usecases:
+
+ * {{{examples/create-project-in-batch-mode.html}create projects in batch mode}}
+
+ * {{{#}create a sub module from an archetype}}
+
+ * {{{#}select the archetype from another catalog}}
+
+ []
+
+
+* Specification
+
+ The specification page contains
+ {{{specification/specification.html}the specification of the main parts of the Archetype Plugin}}.
+
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/index.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetype-handcraft.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetype-handcraft.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetype-handcraft.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetype-handcraft.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,328 @@
+ -----
+ archetype - Archetype handcraft
+ -----
+ The Maven Team
+ -----
+
+Handcrafting archetype
+
+* Archetype
+
+ An archetype is a kind of Maven 2 project which defines its packaging to
+ maven-plugin and which follow a particular directory convention.
+
++--
+|-- pom.xml
+`-- src
+ `-- main
+ `-- resources
+ |-- META-INF
+ | `-- maven
+ | `-- archetype.xml
+ `-- archetype-resources
+ |-- pom.xml
+ `-- src ...
++--
+
+ There is two kind of archetypes: partial or complete. Complete archetypes
+ are used to generate new Maven 2 project, a class library for example.
+ Partial archetypes are used to add a new functionality to a project's build,
+ the use of the modello plugin for example.
+
+ An archetype defines at least 3 files in its tree.
+
+ * The archetype pom is located at the root of the project.
+ It defines the archetype's groupId, artifactId, version and name.
+
+ The name and version of the archetype are used during the selection step
+ of the generation.
+
+ Here is an example of archetype pom.
+
++--
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <groupId>org.codehaus.mojo.archetype.test</groupId>
+ <artifactId>test-start-archetype</artifactId>
+ <packaging>maven-plugin</packaging>
+ <version>1.0-SNAPSHOT</version>
+</project>
++--
+
+ * The archetype descriptor is located in the src/main/resources/META-INF/maven
+ directory and named archetype.xml.
+
+ The descriptor defines the kind of archetype (complete or partial),
+ the archetype properties and the templates.
+
+ Here is an example of archetype descriptor.
+
++--
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype>
+ <name>test-start-archetype</name>
+ <site-group />
+ <required-properties>
+ <required-property>
+ <key>aProperty</key>
+ <default-value>String searched in the sources</default-value>
+ </required-property>
+ </required-properties>
+ <sources-groups>
+ <sources-group>
+ <language>java</language>
+ <templates>
+ <template>App.java</template>
+ </templates>
+ </sources-group>
+ </sources-groups>
+ <test-sources-groups>
+ <test-sources-group>
+ <language>java</language>
+ <templates>
+ <template>AppTest.java</template>
+ </templates>
+ </test-sources-group>
+ </test-sources-groups>
+</archetype>
++--
+
+ * The templates are located in the src/main/resources/archetype-resources
+ directory which is the templates root directory.
+
+ There must be at least one template named pom.xml located at the root of
+ the template directory. This is the generated project's pom.
+
+ The other templates are the sources, resources and site templates.
+
+
+* The descriptor explained
+
+ The archetype descriptor leads the project generation by defining each of
+ the properties used for the template merge. It also defines each of the
+ templates which will be merged with the configured properties to generate
+ the sources of the generated project.
+
+ The archetype.xml file contains the following elements :
+
+ * name: The name of the archetype.
+
++--
+<archetype>
+...
+ <name>test-start-archetype</name>
+...
+</archetype>
++--
+
+ * partial: If the archetype is complete or partial. It is set to true if the
+ archetype is partial. It can be omited and defaults to a complete archetype.
+
++--
+<archetype>
+...
+ <partial>true</partial>
+...
+</archetype>
++--
+
+ * required-properties: The list of the required properties.
+
+ Here is a required property named propertyWithDefaultValue defining a
+ default value containing "the default value". During generation of the
+ archetype, when a template contains this property, it will be replaced by
+ the default value unless it is overrided.
+
++--
+<archetype>
+...
+ <required-properties>
+ ...
+ <required-property>
+ <key>propertyWithDefaultValue</key>
+ <default-value>the default value</default-value>
+ </required-property>
+ ...
+ </required-properties>
+...
+</archetype>
++--
+
+ The default-value element can be omited and that property must be set
+ during the configuration step of the generation.
+
+ The required-properties can be omited if the archetype defines no required
+ properties.
+
+ Archetypes always define four common required properties without defaut
+ values. These common properties are: groupId, artifactId, version and
+ package. The groupId, artifactId and version will be the ones of the
+ generated project. The package will be used in the sources templates.
+
+ All the properties (common and archetype specific) are velocity
+ properties. The properties must be named without a dot, because velocity
+ uses the dot for getting inner properties. See in the
+ {{{http://velocity.apache.org/engine/releases/velocity-1.5/vtl-reference-guide.html}VTL}}
+ guide for more information.
+
+ * sources-groups: The list of the sources templates grouped by language.
+
+ The sources-groups can be omited if the archetype don't have sources.
+
+ Here the extract of the descriptor for a sources group for the c language.
+ The templates of this group uses the ISO-8859-1 encoding. And it also
+ contains one template file named App.c.
+
++--
+<archetype>
+...
+ <sources-groups>
+ ...
+ <sources-group>
+ <language>c</language>
+ <encoding>ISO-8859-1</encoding>
+ <templates>
+ ...
+ <template>App.c</template>
+ ...
+ </templates>
+ </sources-group>
+ ...
+ </sources-groups>
+...
+</archetype>
++--
+
+ A sources-group must define at least one template.
+
+ The language can be omited to default to java.
+
+ The encoding can be omited to default to UTF-8.
+
+ The sources templates files must be located in the directory
+ src/main/{language} from the templates directory.
+
+ A template can be defined in a subdirectory like subfolder/AlternateApp.c.
+
+ The sources files are generated in the with the same name of the template
+ file name. They are generated from the generated project's root directory
+ in the directory src/main/{language}/{package as subdirectories}/{template defined sudirectory}.
+
+ Having the same name as templates, allow to have some xml or properties
+ files generated using the package as subdirectory replacement.
+
+ * test-sources-groups: The list of the test sources templates grouped by
+ language.
+
+ Test sources groups works the same as the sources groups but differ in
+ that the templates must be located in src/test/{language} from the
+ templates directory and the project's files are generated to
+ src/test/{language}/{package as subdirectories}/{template defined sudirectory}.
+
++--
+<archetype>
+...
+ <test-sources-groups>
+ ...
+ <test-sources-group>
+ <templates>
+ ...
+ <template>AppTest.java</template>
+ ...
+ </templates>
+ </test-sources-group>
+ ...
+ </test-sources-groups>
+...
+</archetype>
++--
+
+ * resources-groups: The list of resources templates grouped by directory.
+
+ The resources-groups can be omited if the archetype don't have resources.
+
+ Here the extract of the descriptor for a resources group for the mdo
+ directory.
+ The templates of this group uses the default UTF-8 encoding.
+
++--
+<archetype>
+...
+ <resources-groups>
+ ...
+ <resources-group>
+ <directory>mdo</directory>
+ <templates>
+ ...
+ <template>App.mdo</template>
+ ...
+ </templates>
+ </resources-group>
+ ...
+ </resources-groups>
+...
+</archetype>
++--
+
+ A resources-group must define at least one template.
+
+ The directory can be omited to default to <resources>.
+
+ The encoding can be omited to default to UTF-8.
+
+ The resources templates files must be located in the directory
+ src/main/{directory} from the templates directory.
+
+ A template can be defined in a subdirectory like subfolder/logging.properties.
+
+ The resources files are generated in the with the same name of the template
+ file name. They are generated from the generated project's root directory
+ in the directory src/main/{directory}/{template defined sudirectory}.
+
+ * test-resources-groups: The list of the test resources templates grouped by
+ directory.
+
+ Test resources groups works the same as the resources groups but differ in
+ that the templates must be located in src/test/{directory} from the
+ templates directory and the project's files are generated to
+ src/test/{directory}/{template defined sudirectory}.
+
++--
+<archetype>
+...
+ <test-resources-groups>
+ ...
+ <test-resources-group>
+ <templates>
+ ...
+ <template>AppTest.properties</template>
+ ...
+ </templates>
+ </test-resources-group>
+ ...
+ </test-resources-groups>
+...
+</archetype>
++--
+
+ * site-group: The list of site templates.
+
+ Site group works the same as the resources groups but differ in that the
+ templates must be located in src/site from the templates directory, that
+ they dont have a directory and the project's files are generated to
+ src/site/{template defined sudirectory}.
+
++--
+<archetype>
+...
+ <site-group>
+ <templates>
+ ...
+ <template>site.xml</template>
+ <template>apt/test.apt</template>
+ ...
+ </templates>
+ </site-group>
+...
+</archetype>
++--
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetype-handcraft.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetypes.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetypes.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetypes.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetypes.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,39 @@
+ -----
+ archetype - 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.
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/archetypes.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/creation.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/creation.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/creation.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/creation.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,256 @@
+ -----
+ archetype - 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/archetype 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 archetype:create-from-project>.
+
+
++--
+[rafale@fixe test-start]$ tree
+.
+|-- pom.xml
+`-- src
+ |-- main
+ | `-- java
+ | `-- org
+ | `-- codehaus
+ | `-- mojo
+ | `-- archetype
+ | `-- test
+ | `-- start
+ | `-- App.java
+ `-- test
+ `-- java
+ `-- org
+ `-- codehaus
+ `-- mojo
+ `-- archetype
+ `-- test
+ `-- start
+ `-- AppTest.java
+
+17 directories, 3 files
++--
+
+ Here is a sample project (the one generated by the
+ {{{generation.html}generation}} :-)).
+
++--
+[rafale@fixe test-start]$ mvn archetype:create-from-project
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] artifact org.codehaus.mojo:maven-archetype-plugin: checking for updates from central
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building test-start
+[INFO] task-segment: [archetype:create-from-project]
+[INFO] ----------------------------------------------------------------------------
+[INFO] Preparing archetype:create-from-project
++--
+
+ The first step of the creation: <configure-creation>
+
++--
+[INFO] [archetype:configure-creation]
+Define value for archetype.groupId: org.codehaus.mojo.archetype.test: :
+Define value for archetype.artifactId: test-start-archetype: :
+Define value for archetype.version: 1.0-SNAPSHOT: :
+Define value for groupId: org.codehaus.mojo.archetype.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.archetype.test
+archetype.artifactId: test-start-archetype
+archetype.version: 1.0-SNAPSHOT
+package: org.codehaus.mojo.archetype.test.start
+version: 1.0-SNAPSHOT
+groupId: org.codehaus.mojo.archetype.test
+aProperty: String searched in the sources
+artifactId: test-start
+ Y: : Y
++--
+
+ The archetype configuration is confirmed.
+
++--
+[INFO] [archetype:create-archetype]
++--
+
+ The second step do the work without any comment.
+
++--
+[INFO] [archetype: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.
+
++--
+[rafale@fixe test-start]$ tree target/generated-sources/archetype
+target/generated-sources/archetype
+|-- 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 archetype: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 :-)).
+
++--
+[rafale@fixe test-start]$ cat archetype.properties
+#
+#Mon Mar 12 19:09:51 CET 2007
+version=1.0-SNAPSHOT
+package=org.codehaus.mojo.archetype.test.start
+archetype.groupId=org.codehaus.mojo.archetype.test
+archetype.artifactId=test-start-archetype
+groupId=org.codehaus.mojo.archetype.test
+artifactId=test-start
+archetype.version=1.0-SNAPSHOT
++--
+
+ Here is the plugin execution.
+
++--
+[rafale@fixe test-start]$ tree
+.
+|-- archetype.properties
+|-- pom.xml
+`-- src
+ |-- main
+ | `-- java
+ | `-- org
+ | `-- codehaus
+ | `-- mojo
+ | `-- archetype
+ | `-- test
+ | `-- start
+ | `-- App.java
+ `-- test
+ `-- java
+ `-- org
+ `-- codehaus
+ `-- mojo
+ `-- archetype
+ `-- test
+ `-- start
+ `-- AppTest.java
+
+17 directories, 4 files
++--
+
+ Ensure the property file exists.
+
++--
+[rafale@fixe test-start]$ mvn archetype:create-from-project -B
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] artifact org.codehaus.mojo:maven-archetype-plugin: checking for updates from central
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building test-start
+[INFO] task-segment: [archetype:create-from-project]
+[INFO] ----------------------------------------------------------------------------
+[INFO] Preparing archetype:create-from-project
+[INFO] [archetype:configure-creation]
+[INFO] [archetype:create-archetype]
+[INFO] [archetype: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.
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/creation.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/design.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/design.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/design.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/design.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,129 @@
+ -----
+ archetype - Design
+ -----
+ The Maven Team
+ -----
+
+Design
+
+ The archetype 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.
+
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/design.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/generation.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/generation.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/generation.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/generation.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,281 @@
+ -----
+ archetype - 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 archetype:create>.
+
++--
+[rafale@fixe test]$ tree
+.
+
+0 directories, 0 files
++--
+
+ Ensuring an empty directory.
+
++--
+[rafale@fixe test]$ mvn archetype:create
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] artifact org.codehaus.mojo:maven-archetype-plugin: checking for updates from central
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Maven Default Project
+[INFO] task-segment: [archetype:create] (aggregator-style)
+[INFO] ----------------------------------------------------------------------------
+[INFO] Preparing archetype:create
+[INFO] [archetype: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-archetype-start)
+2: Archetype Archetype (org.codehaus.mojo.archetypes:maven-archetype-archetype)
+3: Plugin Archetype (org.codehaus.mojo.archetypes:maven-archetype-maven-plugin)
+4: Site Archetype (org.codehaus.mojo.archetypes:maven-archetype-site)
+Choose a number: (1/2/3/4): 1
++--
+
+ The <Starting Archetype> is choosen
+
++--
+[INFO] org.codehaus.mojo.archetypes.maven-archetype-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] [archetype:configure-generation]
++--
+
+ The second step of the generation: <configure-generation>
+
++--
+Define value for groupId: : org.codehaus.mojo.archetype.test
+Define value for artifactId: : test-start
+Define value for version: : 1.0-SNAPSHOT
+Define value for package: : org.codehaus.mojo.archetype.test.start
++--
+
+ Each of the common properties are answered.
+
++--
+Confirm properties configuration:
+groupId: org.codehaus.mojo.archetype.test
+artifactId: test-start
+version: 1.0-SNAPSHOT
+package: org.codehaus.mojo.archetype.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] [archetype:generate-project]
++--
+
+ The third step do the work without any comment.
+
++--
+[INFO] [archetype: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.
+
++--
+[rafale@fixe test]$ tree
+archetype.properties test-start/
+[rafale@fixe test]$ tree test-start
+test-start
+|-- pom.xml
+`-- src
+ |-- main
+ | `-- java
+ | `-- org
+ | `-- codehaus
+ | `-- mojo
+ | `-- archetype
+ | `-- test
+ | `-- start
+ | `-- App.java
+ `-- test
+ `-- java
+ `-- org
+ `-- codehaus
+ `-- mojo
+ `-- archetype
+ `-- test
+ `-- start
+ `-- AppTest.java
+
+17 directories, 3 files
++--
+
+* {Batch} mode
+
+ To enable the batch mode and remove the prompts, just run
+ <mvn archetype: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 :-)).
+
++--
+[rafale@fixe test]$ cat archetype.properties
+#
+#Sun Mar 11 22:11:28 CET 2007
+archetype.artifactId=maven-archetype-start
+archetype.groupId=org.codehaus.mojo.archetypes
+archetype.version=1.0-SNAPSHOT
+groupId=org.codehaus.mojo.archetype.test
+artifactId=test-start
+version=1.0-SNAPSHOT
+package=org.codehaus.mojo.archetype.test.start
++--
+
+ Here is the plugin execution.
+
++--
+[rafale@fixe test]$ tree
+.
+`-- archetype.properties
+
+0 directories, 1 file
++--
+
+ Ensure the property file exists.
+
++--
+[rafale@fixe test]$ mvn archetype:create -B
+[INFO] Scanning for projects...
+[INFO] Searching repository for plugin with prefix: 'archetype'.
+[INFO] ----------------------------------------------------------------------------
+[INFO] Building Maven Default Project
+[INFO] task-segment: [archetype:create] (aggregator-style)
+[INFO] ----------------------------------------------------------------------------
+[INFO] Preparing archetype:create
+[INFO] [archetype:select-archetype]
+[INFO] Archetype selected (org.codehaus.mojo.archetypes:maven-archetype-start:1.0-SNAPSHOT)
+[INFO] [archetype: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] [archetype:generate-project]
+[INFO] [archetype: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.
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/generation.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/main.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/main.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/main.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/main.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,42 @@
+ -----
+ archetype - 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 archetype:{{{generation.html}create}}>>> for project
+ generation from an archetype. To avoid console prompts and only use a
+ property file, add <<<-B>>> option.
+
+ * call <<<mvn archetype:{{{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]] archetype {{{design.html}design}} for developers.
+
+ []
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/main.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/mojos.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/mojos.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/mojos.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/mojos.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,87 @@
+ -----
+ archetype - 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/archetype directory.
+
+ []
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/old_documentation/mojos.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-catalog.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-catalog.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-catalog.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-catalog.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,118 @@
+ ------
+ Archetype Catalog
+ ------
+ Raphaël Piéroni
+ ------
+ 10 February 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+How the Archetype Plugin know about archetype?
+
+ Knowledge about archetypes are stored in catalogs.
+
+ The catalogs are xml files.
+
+ The Archetype Plugin comes bundled with an internal catalog.
+ The one used by default.
+
+ 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>
++---
+
+ [[1]] The groupId of the archetype. <<REQUIRED>>
+
+ [[2]] The artifactId of the archetype. <<REQUIRED>>
+
+ [[3]] The version of the archetype. <<<RELEASE>>> is a valid version. <<REQUIRED>>
+
+ [[4]] The repository where to find the archetype. <<OPTIONAL>>. When
+ ommited, the archetype is searched in the repository where the catalog
+ comes from.
+
+ [[5]] The description of the archetype. <<OPTIONAL>>
+
+
+* 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 Archetype Plugin shows a line like:
+
++---
+1: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF)
++---
+
+ * <<<1:>>> The index of the archetype in the aggregated list (starting from
+ 1).
+
+ * <<<internal>>> The name of the catalog where the archetype is originating.
+
+ * <<<appfuse-basic-jsf>>> The artifactId of the archetype
+
+ * <<<(AppFuse archetype...)>>> The description of the archetype as found in
+ the catalog.
+
+
+* Creating a catalog file
+
+ 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
+
+ The Archetype Plugin knows by default its internal catalog. It also know
+ about the <<<local>>> and <<<remote>>> catalogs.
+
+ <<<local>>> represents the catalog file <<<~/.m2/archetype-catalog.xml>>>.
+
+ <<<remote>>> represents the catalog file <<<http://repo1.maven.org/maven2/archetype-catalog.xml>>>.
+
+ 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
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-catalog.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-metadata.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-metadata.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-metadata.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-metadata.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,210 @@
+ ------
+ Archetype Metadata
+ ------
+ Raphaël Piéroni
+ ------
+ 10 February 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+How metadata on an archetype is stored?
+
+ The metadata about an archetype is stored in the archetype-metadata.xml file
+ located in the directory META-INF/maven of it's jar file.
+
+ The metadata file stores the additionnal properties, with corresponding
+ default values.
+
+ It also stores the project's files generation in filesets.
+
+ Finnaly it also stores inner modules of the archetype, which enable the
+ creation of multi-modules projects with a single archetype.
+
+ A minimal archetype-metadata.xml file looks like:
+
++---
+<?xml version="1.0" encoding="UTF-8"?>
+<archetype-descriptor name="basic">
+ <fileSets>
+ <fileSet filtered="true" packaged="true">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+</archetype-descriptor>
++---
+
+ This example above shows:
+
+ * the archetype name is <<<basic>>>
+
+ * the archetype defines a single fileset:
+
+ * the fileset will take all the files in archetype-resources/src/main/java
+ that match the <<<**/*.java>>> pattern
+
+ * the selected files will be generated using the velocity engine
+ (<<<filtered=true>>>)
+
+ * the files will be generated in the src/main/java directory of the
+ generated project in the same directory as in the jar file, but with
+ that directory prepended by the package property.
+
+ []
+
+ []
+
+
+ * Defining additional properties
+
+ The main properties that are used by the velocity engine during project's file generation are groupId, artifactId, version, package.
+
+ It is possible to define additionnal properties that must be valued before the file generation.
+
+ These additionnal properties can be provided with default values, which enable not to ask the user for there values.
+
+ Additionnal properties are defined in the archetype-metadata.xml file with:
+
++---
+<archetype-descriptor name="basic">
+ <requiredProperties>
+ <requiredProperty key="property-with-default">
+ <defaultValue>default-value</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="property-without-default"/>
+ </requiredProperties>
+...
+</archetype-descriptor>
++---
+
+ Here two additionnal properties are defined: <<<property-without-default>>>
+ and <<<property-with-default>>>.
+
+ Be aware that the property keys can not contain any dot as there are
+ velocity properties.
+
+
+* Defining specific filesets
+
+ The filesets contained in the archetype-metadata.xml file defines the way
+ the project's files located in the jar file are used by the Archetype Plugin
+ to generate a project.
+
+ Filesets must define the directory where the files will be searched for
+ which is also the directory where the project's files will be generated.
+ The first is the directory inside the archetype jar file, the second is the
+ directory in the generated project's tree.
+
+ Filesets also defines the inclusion/exclusion of files "Ã la " ant.
+ This provide a powerfull way to describe a large set of files to be selected
+ for the generation process.
+
+ Filesets can be filtered, which means the selected files will be used
+ as Velocity templates. They can be non-filtered, which means the selected
+ files will be binary copied.
+
+ Filesets can be packaged, which means the selected files will be
+ generated/copied in a directory structure that is prepended by the package
+ property. They can be non-packaged, which means that the selected files
+ will be generated/copied without that prepend.
+
+ A fileset is defined in the archetype-metadata.xml with this fragment:
+
++---
+...
+ <fileSets>
+ <fileSet filtered="true" packaged="true">
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ <excludes>
+ <excludeAllTest.java</include>
+ </excludes>
+ </fileSet>
+ </fileSets>
+...
++---
+
+ This example shows a fileset that will select all the java files in the
+ <<<src/test/java>>> directory of the archetype resources, but the
+ <<<AllTest.java>>> file that is located at the root of this directory.
+
+ This filset also is packaged and filtered.
+
+
+* Defining multi module in the archetype metadata
+
+ Inner modules of an archetype are used to create a multi module Maven 2
+ project from a single archetype.
+
+ Modules in the archetype-metadata.xml file are defined like:
+
++---
+<archetype-descriptor name="multi-module">
+ <fileSets>
+ ...
+ </fileSets>
+ <modules>
+ <module name="SubProject" id="subproject" dir="sub-project">
+ <fileSets>
+ ...
+ </fileSets>
+ </module>
+ </modules>
+</archetype-descriptor>
++---
+
+ In the example above, the archetype <<<multi-module>>> contains a module
+ named <<<SubProject>>>. This module is located in the <<<sub-project>>>
+ directory of the archetype. It also has the artifactId <<<subproject>>>.
+
+ The attributes name, id and dir of the module are used to determine the
+ directory where togenerated that module files, they also are used to
+ determine the artifactId of the Maven 2 project corresponding to this
+ module.
+
+
+* Putting all together
+
+ The <<<requiredProperties>>> is only allowed as a child of
+ archetype-descriptor.
+
+ Modules are allowed in archetype-descriptor and in modules (no limit is
+ given).
+
+ archetype-descriptor and modules must define at least one fileset each to
+ be valid.
+
+ It is possible to define default values to main required properties by
+ defining say the groupId and giving it a default:
+
++---
+...
+ <requiredProperties>
+ <requiredProperty key="groupId">
+ <defaultValue>com.company.department</defaultValue>
+ </requiredProperty>
++---
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype-metadata.apt
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype.apt?rev=631007&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype.apt (added)
+++ maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype.apt Mon Feb 25 13:40:20 2008
@@ -0,0 +1,90 @@
+ ------
+ Archetype
+ ------
+ Raphaël Piéroni
+ ------
+ 10 February 2008
+ ------
+
+~~ Licensed to the Apache Software Foundation (ASF) under one
+~~ or more contributor license agreements. See the NOTICE file
+~~ distributed with this work for additional information
+~~ regarding copyright ownership. The ASF licenses this file
+~~ to you under the Apache License, Version 2.0 (the
+~~ "License"); you may not use this file except in compliance
+~~ with the License. You may obtain a copy of the License at
+~~
+~~ http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing,
+~~ software distributed under the License is distributed on an
+~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+~~ KIND, either express or implied. See the License for the
+~~ specific language governing permissions and limitations
+~~ under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/guides/mini/guide-apt-format.html
+
+
+What is an archetype?
+
+* A Maven 2 project 'en devenir'
+
+ I.e. a abstract representation of a kind of project
+ that can be instanciated into a concrete customised
+ Maven 2 project.
+
+ An archetype knows which files will be part of the
+ instanciated project and which properties to fill
+ to properly customise the project.
+
+ Each archetype defines a set of common properties:
+
+ * groupId which will be the groupId of the project
+
+ * artifactId which will be the artifactId of the project
+
+ * version which will be the version of the project
+
+ * package which will be the base package of all source files of the project
+
+ []
+
+
+
+* A jar file
+
+ The minimal content of the jar file:
+
++---
+.
+|-- META-INF
+| `-- maven
+| `-- archetype-metadata.xml [1]
+`-- archetype-resources
+ |-- ... [2]
+ `-- pom.xml [3]
++---
+
+ [[1]] The metadata file that defines:
+
+ * the default values of the common properties,
+
+ * a set of additional properties with their default values,
+
+ * a set of archetype resources;
+
+ []
+
+ [[2]] The resources files defined by the archetype metadata,
+
+ [[3]] The pom file of a Maven 2 project.
+
+ []
+
+
+* Note
+
+ The common properties should be renamed to ${target.groupId}, ...
+ to avoid name clash.
\ No newline at end of file
Propchange: maven/archetype/trunk/archetype-site/src/site/apt/specification/archetype.apt
------------------------------------------------------------------------------
svn:eol-style = native