Added maven.junit.format property that defaults to brief.

Changed formatters to use maven.junit.usefile consistently.
        Only set 'dir' property of junit task if fork != 'no'


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114571 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
dion 2004-01-08 04:42:40 +00:00
parent 6a6d56ae0c
commit a16d28f12d
5 changed files with 28 additions and 12 deletions

View File

@ -89,9 +89,10 @@
<junit printSummary="${maven.junit.printSummary}"
failureProperty="maven.test.failure"
fork="${maven.junit.fork}"
dir="${maven.junit.dir}">
fork="${maven.junit.fork}">
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no')}">
<setProperty name="dir" value="${maven.junit.dir}" />
</j:if>
<sysproperty key="basedir" value="${basedir}"/>
<u:tokenize var="listOfProperties" delim=" ">${maven.junit.sysproperties}</u:tokenize>
<j:forEach var="someProperty" items="${listOfProperties}">
@ -102,7 +103,7 @@
<jvmarg value="${somejvmarg}"/>
</j:forEach>
<formatter type="xml"/>
<formatter type="plain" usefile="${maven.junit.usefile}"/>
<formatter type="${maven.junit.format}" usefile="${maven.junit.usefile}"/>
<classpath>
<pathelement location="${maven.test.dest}"/>
<pathelement location="${maven.build.dest}"/>
@ -201,8 +202,7 @@
<jvmarg value="${somejvmarg}"/>
</j:forEach>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<formatter type="plain" usefile="true"/>
<formatter type="${maven.junit.format}" usefile="${maven.junit.usefile}"/>
<classpath>
<pathelement location="${maven.test.dest}"/>
@ -265,8 +265,7 @@
<jvmarg line="${jvmargs}"/>
</j:if>
<formatter type="xml"/>
<formatter type="plain" usefile="false"/>
<formatter type="plain" usefile="true"/>
<formatter type="${maven.junit.format}" usefile="${maven.junit.usefile}"/>
<classpath>
<pathelement location="${maven.test.dest}"/>

View File

@ -4,11 +4,13 @@
# JUnit test plugin.
# -------------------------------------------------------------------
maven.junit.fork = no
maven.junit.dir = ${basedir}
maven.junit.usefile = true
maven.junit.fork = no
maven.junit.format=brief
maven.junit.jvmargs=
maven.junit.printSummary=true
maven.junit.usefile = true
maven.test.dest = ${maven.build.dir}/test-classes
maven.test.reportsDirectory = ${maven.build.dir}/test-reports
maven.test.skip = false
maven.junit.jvmargs=

View File

@ -5,7 +5,7 @@
<pomVersion>3</pomVersion>
<id>maven-test-plugin</id>
<name>Maven Test Plug-in</name>
<currentVersion>1.4</currentVersion>
<currentVersion>1.5-SNAPSHOT</currentVersion>
<description/>
<shortDescription>Run JUnit tests</shortDescription>
<url>http://maven.apache.org/reference/plugins/test/</url>

View File

@ -6,6 +6,13 @@
</properties>
<body>
<release version="1.5" date="in CVS">
<action dev="dion" type="add">
Added maven.junit.format property that defaults to brief.
Changed formatters to use maven.junit.usefile consistently.
Only set 'dir' property of junit task if fork != 'no'
</action>
</release>
<release version="1.4" date="2003-09-29">
<action dev="dion" type="update">
Apply MAVEN-309. Reorganise classpaths so that it's test, build, dependencies

View File

@ -19,6 +19,14 @@
<code>no</code>.
</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>