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/09/12 18:10:32 UTC
svn commit: r694722 - in
/maven/archetype/trunk/archetype-plugin/src/site/apt: ./ examples/
Author: rafale
Date: Fri Sep 12 09:10:32 2008
New Revision: 694722
URL: http://svn.apache.org/viewvc?rev=694722&view=rev
Log:
Documentation upgrades
Added:
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-multi-module-project.apt (with props)
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt (contents, props changed)
- copied, changed from r693170, maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-alternative-catalog.apt
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt (contents, props changed)
- copied, changed from r693170, maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-batch.apt
Removed:
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-alternative-catalog.apt
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-basic.apt
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-batch.apt
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-from-project-basic.apt
maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-from-project-deploy.apt
Modified:
maven/archetype/trunk/archetype-plugin/src/site/apt/index.apt
maven/archetype/trunk/archetype-plugin/src/site/apt/usage.apt
Added: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-multi-module-project.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-multi-module-project.apt?rev=694722&view=auto
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-multi-module-project.apt (added)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-multi-module-project.apt Fri Sep 12 09:10:32 2008
@@ -0,0 +1,51 @@
+ ------
+ Create an archetype from a multi module project
+ ------
+ Raphaël Piéroni
+ ------
+ 10 September 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/doxia/references/apt-format.html
+
+ * Create an archetype from a multi module project
+
+ Creating an archetype for a multi module project is as simple as
+ {{{../advanced-usage.html}creating one for a mono module project}}.
+
+ Just move to the root directory of a multi-module project and call
+ <<<mvn archetype:create-from-project>>>.
+
++--
+$ mvn archetype:create-from-project
++--
+
+ Install the archetype as usual.
++--
+$ cd target/generated-sources/archetype/
+$ mvn install
++--
+
+ And use it
++--
+$ cd /tmp/archetype/
+$ mvn archetype:generate -DarchetypeCatalog=local
++--
\ No newline at end of file
Propchange: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-multi-module-project.apt
------------------------------------------------------------------------------
svn:eol-style = native
Copied: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt (from r693170, maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-alternative-catalog.apt)
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt?p2=maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt&p1=maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-alternative-catalog.apt&r1=693170&r2=694722&rev=694722&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-alternative-catalog.apt (original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt Fri Sep 12 09:10:32 2008
@@ -1,9 +1,9 @@
------
- XXXXXXX
+ Generate project using an alternative catalog
------
Raphaël Piéroni
------
- 2008
+ 09 September 2008
------
~~ Licensed to the Apache Software Foundation (ASF) under one
@@ -26,3 +26,82 @@
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html
+ * Generate project using an alternative catalog
+
+ It is possible to use an alternative catalog as the internal one by defining
+ the <<<archetypeCatalog>>> property to a specific value which can be one of:
+
+ * <<<internal>>> to use the internal catalog only.
+
+ * <<<local>>> to use the local catalog only.
+
+ * <<<remote>>> to use the maven's remote catalog. No catalog is currently provided.
+
+ * <<<file://path/to/archetype-catalog.xml>>> to use a specific local catalog.
+ When the catalog file is named <<<archetype-catalog.xml>>>, it can be omited.
+
+ * <<<http://url/to/archetype-catalog.xml>>> to use a specific remote catalog.
+ When the catalog file is named <<<archetype-catalog.xml>>>, it can be omited.
+
+ []
+
+ The default value is <<<local,internal>>>. Thus the internal catalog is shown
+ just after the local one.
+
++--
+$ mvn archetype:generate -DarchetypeCatalog=http://cocoon.apache.org
+[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]
+[INFO] Generating project in Interactive mode
+[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
+Choose archetype:
+1: http://cocoon.apache.org -> cocoon-22-archetype-block-plain (Creates an empty Cocoon block; useful if you want to add another block to a Cocoon application)
+2: http://cocoon.apache.org -> cocoon-22-archetype-block (Creates a Cocoon block containing some small samples)
+3: http://cocoon.apache.org -> cocoon-22-archetype-webapp (Creates a web application configured to host Cocoon blocks. Just add the block dependencies)
+Choose a number: (1/2/3): 1
+Downloading: http://localhost:8081/nexus/content/groups/mac/org/apache/cocoon/cocoon-22-archetype-block-plain/1.0.0/cocoon-22-archetype-block-plain-1.0.0.jar
+13K downloaded
+Define value for groupId: : com.company
+Define value for artifactId: : example
+Define value for version: 1.0-SNAPSHOT: :
+Define value for package: com.company: : com.company.example
+Confirm properties configuration:
+groupId: com.company
+artifactId: example
+version: 1.0-SNAPSHOT
+package: com.company.example
+ Y: :
+[INFO] ----------------------------------------------------------------------------
+[INFO] Using following parameters for creating OldArchetype: cocoon-22-archetype-block-plain:1.0.0
+[INFO] ----------------------------------------------------------------------------
+[INFO] Parameter: groupId, Value: com.company
+[INFO] Parameter: packageName, Value: com.company.example
+[INFO] Parameter: package, Value: com.company.example
+[INFO] Parameter: artifactId, Value: example
+[INFO] Parameter: basedir, Value: /private/tmp/archetype
+[INFO] Parameter: version, Value: 1.0-SNAPSHOT
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/pom.xml [line 20,column 6] : $Id is not a valid reference.
+[INFO] ********************* End of debug info from resources from generated POM ***********************
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml [line 20,column 6] : $Id is not a valid reference.
+[WARNING] org.apache.velocity.runtime.exception.ReferenceException: reference : template = archetype-resources/src/main/resources/META-INF/cocoon/spring/block-application-context.xml [line 18,column 6] : $Id is not a valid reference.
+[INFO] OldArchetype created in dir: /private/tmp/archetype/example
+[INFO] ------------------------------------------------------------------------
+[INFO] BUILD SUCCESSFUL
+[INFO] ------------------------------------------------------------------------
+[INFO] Total time: 1 minute 20 seconds
+[INFO] Finished at: Tue Sep 09 19:10:51 CEST 2008
+[INFO] Final Memory: 8M/15M
+[INFO] ------------------------------------------------------------------------
+
++--
\ No newline at end of file
Propchange: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-alternative-catalog.apt
------------------------------------------------------------------------------
svn:mergeinfo =
Copied: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt (from r693170, maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-batch.apt)
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt?p2=maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt&p1=maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-batch.apt&r1=693170&r2=694722&rev=694722&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/examples/create-batch.apt (original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt Fri Sep 12 09:10:32 2008
@@ -1,5 +1,5 @@
------
- Create project in batch mode
+ Generate project in batch mode
------
Raphaël Piéroni
------
@@ -26,14 +26,15 @@
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html
- * Create project in batch mode
+ * Generate 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.
+ by defining the <<<interactive>>> property to <<<false>>> or by using the -B
+ flag.
+ A couple of meaningfull properties are then required.
The archetypeGroupId, archetypeArtifactId and archetypeVersion defines the
- archetype to use for project creation.
+ archetype to use for project generation.
The groupId, artifactId, version and package are the main properties to be
set. Each archetype require these properties. Some archetypes defines other
@@ -41,23 +42,22 @@
+--
-$ 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
+$ mvn archetype:generate -B -DarchetypeGroupId=org.apache.maven.archetypes -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] task-segment: [archetype:generate] (aggregator-style)
[INFO] ------------------------------------------------------------------------
-[INFO] Preparing archetype:create
+[INFO] Preparing archetype:generate
[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] [archetype:generate]
+[INFO] Generating project in Batch mode
+[INFO] Archetype repository missing. Using the one from [org.apache.maven.archetypes:maven-archetype-quickstart:RELEASE] found in catalog internal
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating OldArchetype: maven-archetype-quickstart:1.0
[INFO] ----------------------------------------------------------------------------
@@ -65,15 +65,16 @@
[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: basedir, Value: /private/tmp/archetype
[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] OldArchetype created in dir: /private/tmp/archetype/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] Total time: 2 seconds
+[INFO] Finished at: Tue Sep 09 18:59:24 CEST 2008
+[INFO] Final Memory: 8M/15M
[INFO] ------------------------------------------------------------------------
+
+--
\ No newline at end of file
Propchange: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/archetype/trunk/archetype-plugin/src/site/apt/examples/generate-batch.apt
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: maven/archetype/trunk/archetype-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/index.apt?rev=694722&r1=694721&r2=694722&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/index.apt (original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/index.apt Fri Sep 12 09:10:32 2008
@@ -45,8 +45,8 @@
The Archetype Plugin is embedded in IDEs {{{#}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.
+ {{{advanced-usage.html}Instructions 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
@@ -74,13 +74,25 @@
The following examples show how to use the Archetype Plugin in more advanced
usecases:
- * {{{examples/create-batch.html}Create projects in batch mode}}
+ * {{{examples/generate-batch.html}Generate projects in batch mode}}
+
+ * {{{examples/generate-alternative-catalog.html}Generate project using an alternative catalog}}
+
+~~ TODO: The link on the following line doesn't work
+ * {{{examples/create-multi-module-project.html}Create an archetype from a multi module project}}
+
+~~ TODO: The link on the following line doesn't work
+ * {{{#}Generate a sub module from an archetype}}
+
+~~ TODO: The link on the following line doesn't work
+ * {{{#}Create an archetype in batch mode}}
~~ TODO: The link on the following line doesn't work
- * {{{#}Create a sub module from an archetype}}
+ * {{{#}Create an archetype with a property file}}
~~ TODO: The link on the following line doesn't work
- * {{{#}Select the archetype from another catalog}}
+ * {{{#}Handcrafting an archetype}} or features available to an archetype
+ when not created by <<<create-from-project>>>.
[]
Modified: maven/archetype/trunk/archetype-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/archetype/trunk/archetype-plugin/src/site/apt/usage.apt?rev=694722&r1=694721&r2=694722&view=diff
==============================================================================
--- maven/archetype/trunk/archetype-plugin/src/site/apt/usage.apt (original)
+++ maven/archetype/trunk/archetype-plugin/src/site/apt/usage.apt Fri Sep 12 09:10:32 2008
@@ -169,6 +169,6 @@
For backward compatibility with the Archetype Plugin version 1.0-alpha-7,
we kept the old <<<create>>> goal which can be called using
<<<mvn archetype:create>>>.
-~~ TODO: The link on the following line doesn't work
- See {{{#}the old documentation}} for further
+
+ See {{{http://maven.apache.org/plugins/maven-archetype-plugin-1.0-alpha-7/index.html}the old documentation}} for further
reading.
\ No newline at end of file