jvanzyl 2003/07/28 05:55:44
Modified: xdocs/reference user-guide.xml
Log:
o Adding some more info on resource handling.
Revision Changes Path
1.57 +47 -3 maven/xdocs/reference/user-guide.xml
Index: user-guide.xml
===================================================================
RCS file: /home/cvs/maven/xdocs/reference/user-guide.xml,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- user-guide.xml 11 Jul 2003 07:29:05 -0000 1.56
+++ user-guide.xml 28 Jul 2003 12:55:44 -0000 1.57
@@ -1109,7 +1109,20 @@
<section name="Testing">
+ <!-- Change this section into a demonstratino of the resources element in
general -->
+
<subsection name="Test Resources">
+ <p>
+ It is a fairly common occurrence that you want to include some resources
in your
+ test classpath for testing purposes. Maven allows you include any
arbitrary set of
+ resources for testing by utilizing the project/build/unitTest/resources
element in your POMs.
+ </p>
+
+ <p>
+ The following example demonstrates how to recursively include all files
with an 'xml'
+ or 'properties' extension within the ${basedir}/src/test directory:
+ </p>
+
<source><![CDATA[
<project>
...
@@ -1118,12 +1131,11 @@
<unitTest>
...
<resources>
- <!-- A -->
<resource>
<directory>${basedir}/src/test</directory>
<includes>
- <include>*.xml</include>
- <include>*.properties</include>
+ <include>**/*.xml</include>
+ <include>**/*.properties</include>
</includes>
</resource>
</resources>
@@ -1131,6 +1143,38 @@
</build>
</project>
]]></source>
+
+ <p>
+ The following example demonstrates how to recursively include all files
with an 'xml'
+ or 'properties' extension within the ${basedir}/src/test directory and
exclude the
+ naughty.properties file. Note the addition of the
project/build/unitTest/resources/excludes
+ element:
+ </p>
+
+<source><![CDATA[
+ <project>
+ ...
+ <build>
+ ...
+ <unitTest>
+ ...
+ <resources>
+ <resource>
+ <directory>${basedir}/src/test</directory>
+ <includes>
+ <include>**/*.xml</include>
+ <include>**/*.properties</include>
+ </includes>
+ <excludes>
+ <exclude>naughty.properties</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ </unitTest>
+ </build>
+ </project>
+]]></source>
+
</subsection>
<subsection name="Running a Single Test">
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]