maven-plugins/test/xdocs/properties.xml
brett 889c0fe2ed PR: MPTEST-55
Submitted by: Eric Hartmann
Reviewed by:  Brett Porter
add the ability to not include the XML APIs and xerces when forking tests


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@267430 13f79535-47bb-0310-9956-ffa450edef68
2005-09-03 07:01:37 +00:00

232 lines
7.9 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed 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.
*/
-->
<document>
<properties>
<title>Test Properties</title>
<author email="smor@apache.org">Stéphane MOR</author>
</properties>
<body>
<section name="Test Settings">
<table>
<tr><th>Property</th><th>Optional?</th><th>Description</th></tr>
<tr>
<td>maven.junit.fork</td>
<td>Yes</td>
<td>
When using Java 1.4, it may be necessary to fork the JUnit
tests to prevent XML parser issues. The default value is
<code>no</code>.
</td>
</tr>
<tr>
<td>maven.junit.forkmode</td>
<td>Yes</td>
<td>
NOTE: Ignored in maven &lt; 1.1.
Controls how many Java Virtual Machines get created if you want
to fork some tests. Possible values are "perTest" (the default),
and "once". "once" creates only a single Java VM for
all tests while "perTest" creates a new VM for each TestCase class.
Note that only tests with the same settings of
filtertrace, haltonerror, haltonfailure, errorproperty and failureproperty
can share a VM, so even if you set forkmode to "once", Ant may have
to create more than a single Java VM. This attribute is ignored for
tests that don't get forked into a new Java VM.
</td>
</tr>
<tr>
<td>maven.junit.format</td>
<td>Yes</td>
<td>
Specifies the formatter to use for output to the console.
Defaults to <code>brief</code>
</td>
</tr>
<tr>
<td>maven.junit.dir</td>
<td>Yes</td>
<td>
The directory to invoke the VM in. (ignored if fork is disabled).
The default value is <code>${basedir}</code>.
</td>
</tr>
<tr>
<td>maven.junit.usefile</td>
<td>Yes</td>
<td>
If this value is set to false, JUnit test run details will appear on
the console as the tests are executed. If not, they are stored in
a file in the <code>test-reports</code> directory. The default value
is <code>true</code>.
</td>
</tr>
<tr>
<td>maven.junit.printSummary</td>
<td>Yes</td>
<td>
If this value is set to false, JUnit test run details will not
include test summary information for a suite. Default value is
<code>true</code>. This parameter corresponds to the JUnit Ant
task <code>printSummary</code> attribute.
</td>
</tr>
<tr>
<td>maven.junit.jvm</td>
<td>Yes</td>
<td>
If this property is set it is used as the JVM for the junit tests
to run in. This is passed to the Ant junit task in the jvm property.
If maven.junit.fork is not true, this is ignored.
</td>
</tr>
<tr>
<td>maven.test.dest</td>
<td>Yes</td>
<td>
Specifies the unit test classes directory. This is the
location where the java classes for the test source
code will be generated to. The default value is
<code>${maven.build.dir}/test-classes</code>.
</td>
</tr>
<tr>
<td>maven.test.skip</td>
<td>Yes</td>
<td>
Set this to 'true' to bypass unit tests entirely. Its use
is <b>NOT RECOMMENDED</b>, but quite convenient on occasion.
</td>
</tr>
<tr>
<td>maven.test.failure.ignore</td>
<td>Yes</td>
<td>
Set this to <code>true</code> to ignore a failure during testing.
Its use is <b>NOT RECOMMENDED</b>, but quite convenient on occasion.
</td>
</tr>
<tr>
<td>maven.test.source</td>
<td>Yes</td>
<td>
<p>
Provide source compatibility with a specific release
</p>
<p>
Corresponds to the <code>source</code> attribute for the ant
<a href="http://ant.apache.org/manual/CoreTasks/javac.html">javac</a>
task.
</p>
</td>
</tr>
<tr>
<td>maven.junit.jvmargs</td>
<td>Yes</td>
<td>
If fork is enabled, additional parameters may be passed to the new VM.
You can specify some args separated by a space.
Sample :
<source><![CDATA[
maven.junit.jvmargs=-Xmx160m -verbose
]]>
</source>
</td>
</tr>
<tr>
<td>maven.junit.envvars</td>
<td>Yes</td>
<td>
If fork is enabled, additional environment variables may be passed to the new VM.
You can specify some variable separated by a space.
Each variable is describe in sub properties.
Sample :
<source><![CDATA[
maven.junit.envvars=LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/local/lib
]]>
</source>
</td>
</tr>
<tr>
<td>maven.junit.sysproperties</td>
<td>Yes</td>
<td>
Use this property elements to specify system properties required
by the class. These properties will be made available to the VM during
the execution of the test (either Maven's VM or the forked VM, if fork is enabled).
You can specify system properties separate by space.
Each properties is describe in sub properties.
Sample :
<source><![CDATA[
maven.junit.sysproperties=prop1 basedir
prop1=your value
basedir=${basedir}
]]>
</source>
</td>
</tr>
<tr>
<td>maven.test.search.classdir</td>
<td>Yes</td>
<td>
Use this property to specify that JUnit should search the test classes directory
rather than the source directory. This allows for test cases to be written in other
languages such as Groovy which generate bytecode that can then be used by this plugin.
Sample :
<source><![CDATA[
maven.test.search.classdir=true
]]>
</source>
</td>
</tr>
<tr>
<td>maven.test.excludeXmlApis</td>
<td>Yes</td>
<td>
If set to yes, the XML APIs will not be added to the list of libraries used for your test cases
when forked. This should be used when you provide your own XML APIs library. By default, it is
<code>no</code>.
</td>
</tr>
<tr>
<td>testmatchpattern</td>
<td>Yes (required in test:match)</td>
<td>
List of ant patterns (spared by commas) used in test:match goal to specify the
tests that should run
</td>
</tr>
<tr>
<td>testnotmatchpattern</td>
<td>Yes</td>
<td>
List of ant patterns (spared by commas) used in test:match goal to specify the
tests that shouldn't run
</td>
</tr>
</table>
</section>
</body>
</document>