Repository: maven-archetype
Updated Branches:
  refs/heads/master 32091e6d6 -> f5cdc4855


ARCHETYPE-496 Add more documentation

Add some more documentation on how to add tests when creating
archetype from existing project.

Related to: https://issues.apache.org/jira/browse/ARCHETYPE-496


Project: http://git-wip-us.apache.org/repos/asf/maven-archetype/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-archetype/commit/f5cdc485
Tree: http://git-wip-us.apache.org/repos/asf/maven-archetype/tree/f5cdc485
Diff: http://git-wip-us.apache.org/repos/asf/maven-archetype/diff/f5cdc485

Branch: refs/heads/master
Commit: f5cdc4855440c20d339e8ebb62e8bc973ad3bb9e
Parents: 32091e6
Author: Petar Tahchiev <[email protected]>
Authored: Fri Aug 12 16:59:10 2016 +0300
Committer: Petar Tahchiev <[email protected]>
Committed: Fri Aug 12 16:59:10 2016 +0300

----------------------------------------------------------------------
 .../archetype/mojos/CreateArchetypeFromProjectMojo.java      | 8 ++++++++
 .../src/site/apt/specification/create-from-project.apt       | 5 +++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/f5cdc485/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
----------------------------------------------------------------------
diff --git 
a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
 
b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
index ab0162a..a0b6076 100644
--- 
a/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
+++ 
b/maven-archetype-plugin/src/main/java/org/apache/maven/archetype/mojos/CreateArchetypeFromProjectMojo.java
@@ -78,6 +78,14 @@ import java.util.Properties;
  * <dt>custom properties</dt><dd>You may identify additional strings that 
should be replaced by parameters.
  * To add custom properties, you must use the <code>propertyFile</code> 
parameter to specify a property file.
  * See the documentation for <code>propertyFile</code> for the details.
+ * </dd>
+ * <dt>integration tests</dt><dd>You may also specify a set of integration 
tests to be executed right after
+ * you create archetype from the project. Each test consists of a separate 
folder under src/it/projects folder and
+ * in there you specify <code>archetype.properties</code>, 
<code>goal.txt</code> and <code>verify.groovy</code> files.
+ * The <code>archetype.properties</code> file is the file used to generate a 
new project from the newly created archetype
+ * and the <code>goal.txt</code> a single-line file to specify the maven goal 
to invoke after generation of the test-project.
+ * Finally the <code>verify.groovy</code> is a groovy file that you can use to 
specify your assertions on the generated project.
+ * </dd>
  * </dl>
  * <p>
  * Note that you may need to edit the results of this goal. This goal has no 
way to exclude unwanted files,

http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/f5cdc485/maven-archetype-plugin/src/site/apt/specification/create-from-project.apt
----------------------------------------------------------------------
diff --git 
a/maven-archetype-plugin/src/site/apt/specification/create-from-project.apt 
b/maven-archetype-plugin/src/site/apt/specification/create-from-project.apt
index eae094c..850b6b1 100644
--- a/maven-archetype-plugin/src/site/apt/specification/create-from-project.apt
+++ b/maven-archetype-plugin/src/site/apt/specification/create-from-project.apt
@@ -50,6 +50,11 @@ What is done during the creation of an archetype?
 
     Finishing by creating the POM for the archetype as a project.
 
+* Archetype testing
+
+    If you are creating an archetype from existing project all the tests from 
src/<it/projects> folder
+    will be executed at this point.
+
 * Archetype installation
 
     Optionally, after creating the archetype, the Archetype Plugin installs the

Reply via email to