You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/05/10 12:07:45 UTC
svn commit: r655036 - in /maven/plugins/trunk/maven-invoker-plugin/src/site:
apt/advance-usage.apt apt/examples/access-test-classes.apt
apt/examples/clone-projects.apt apt/examples/fast-use.apt
apt/examples/post-build-script.apt apt/usage.apt fml/faq.fml
Author: bentmann
Date: Sat May 10 03:07:45 2008
New Revision: 655036
URL: http://svn.apache.org/viewvc?rev=655036&view=rev
Log:
o Polished site
Modified:
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/advance-usage.apt
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/access-test-classes.apt
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/clone-projects.apt
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/fast-use.apt
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt
maven/plugins/trunk/maven-invoker-plugin/src/site/apt/usage.apt
maven/plugins/trunk/maven-invoker-plugin/src/site/fml/faq.fml
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/apt/advance-usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/advance-usage.apt?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/apt/advance-usage.apt (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/apt/advance-usage.apt Sat May 10 03:07:45 2008
@@ -32,5 +32,5 @@
used in the parameter. See this example command line:
+---
- mvn -Dinvoker.test=*MWAR*,simple*
+ mvn invoker:run -Dinvoker.test=*MWAR*,simple*
+---
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/access-test-classes.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/access-test-classes.apt?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/access-test-classes.apt (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/access-test-classes.apt Sat May 10 03:07:45 2008
@@ -21,7 +21,6 @@
<executions>
<execution>
<id>integration-test</id>
- <phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
@@ -37,6 +36,8 @@
+----
Setting <<<addTestClassPath>>> to <<<true>>> will prepend the directory <<<$\{project.build.testOutputDirectory\}>>>
- and all dependencies of your project to the class path of the script interpreter. Of course, this requires your test
- classes to be compiled before running the integration tests but this is usually the case if you employ the Invoker
- Plugin during the lifecycle phase <<<integration-test>>>.
+ and all dependencies of your project to the class path of the script interpreter. Among others, this allows you to
+ create some utility classes in your test source tree and use this code for the integration tests.
+
+ <Note:> Of course, this requires your test classes to be compiled before running the integration tests but this is
+ usually the case if you employ the Invoker Plugin during the lifecycle phase <<<integration-test>>>.
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/clone-projects.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/clone-projects.apt?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/clone-projects.apt (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/clone-projects.apt Sat May 10 03:07:45 2008
@@ -25,7 +25,6 @@
<executions>
<execution>
<id>integration-test</id>
- <phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/fast-use.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/fast-use.apt?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/fast-use.apt (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/fast-use.apt Sat May 10 03:07:45 2008
@@ -8,14 +8,16 @@
Fast Invoker Plugin Configuration
- The plugin use an empty to launch it test. This means by default, the plugin will
- download all artifacts from the central repo.
- <<This default bevahiour can be very long !.>>
+ If you follow the recommended approach and use a dedicated local repository for the integration tests (e.g.
+ <<<target/local-repo>>>), you will likely encounter long build times. If the test repository has been cleaned, the
+ plugin needs to re-download all artifacts from the central repo and the resulting network traffic slows the test
+ execution down.
+
But you can configure the plugin to download released artifacts from your local repo.
- NOTE : this will works without optionnal settings with maven >= 2.0.9 because all plugins
- versions are locked in the super pom. For older version, you have to lock plugins versions.
+ <Note:> This will work without optional settings with Maven >= 2.0.9 because many plugins
+ versions are locked in the super POM. For older versions, you have to lock plugins versions.
- To enable this feature, you have to add a settings.xml file in your project (by example in src/it/settings.xml)
+ To enable this feature, you have to add a <<<settings.xml>>> file in your project (for example in <<<src/it/settings.xml>>>)
and modify the plugin configuration as this :
-------------------
@@ -46,7 +48,7 @@
<settings>
<profiles>
<profile>
- <id>apache</id>
+ <id>it-repo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/apt/examples/post-build-script.apt Sat May 10 03:07:45 2008
@@ -22,7 +22,6 @@
<executions>
<execution>
<id>integration-test</id>
- <phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/apt/usage.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/apt/usage.apt?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/apt/usage.apt (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/apt/usage.apt Sat May 10 03:07:45 2008
@@ -14,7 +14,7 @@
is commonly used to run and verify integration tests for a project. This is done using
the <<<{{{run-mojo.html} invoker:run }}>>> goal.
-* Basic example
+* Basic Example
The following example shows basic plugin configuration for running integration tests.
The projects directory (<<<src/it>>>) is the location where the plugin will look for test projects
@@ -31,7 +31,6 @@
<executions>
<execution>
<id>integration-test</id>
- <phase>integration-test</phase>
<goals>
<goal>run</goal>
</goals>
@@ -49,4 +48,4 @@
...
</project>
-------------------
-
\ No newline at end of file
+
\ No newline at end of file
Modified: maven/plugins/trunk/maven-invoker-plugin/src/site/fml/faq.fml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/site/fml/faq.fml?rev=655036&r1=655035&r2=655036&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/site/fml/faq.fml (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/site/fml/faq.fml Sat May 10 03:07:45 2008
@@ -64,5 +64,17 @@
</p>
</answer>
</faq>
+ <faq id="question3">
+ <question>How can I share common code between the pre-/post-build scripts?</question>
+ <answer>
+ <p>
+ If you want to avoid copy&paste of lengthy code snippets within the IT scripts, you can move this code
+ into a regular Java class. More precisely, you would place this utility code somewhere in your test source
+ tree and set the plugin parameter <a href="run-mojo.html#addTestClassPath"><code>addTestClassPath</code></a>
+ to <code>true</code>. For more details, please see the example
+ <a href="examples/access-test-classes.html">Accessing Test Classes</a>.
+ </p>
+ </answer>
+ </faq>
</part>
</faqs>