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
This commit is contained in:
brett
2005-09-03 07:01:37 +00:00
parent 0911a018b6
commit 889c0fe2ed
5 changed files with 19 additions and 6 deletions

View File

@@ -58,7 +58,7 @@
<pathelement path="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no')}">
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no') and !context.getVariable('maven.test.excludeXmlApis').toString().trim().equalsIgnoreCase('yes') }">
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</j:if>
@@ -159,7 +159,7 @@
<pathelement location="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no')}">
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no') and !context.getVariable('maven.test.excludeXmlApis').toString().trim().equalsIgnoreCase('yes') }">
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</j:if>
@@ -215,7 +215,7 @@
<pathelement location="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no')}">
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no') and !context.getVariable('maven.test.excludeXmlApis').toString().trim().equalsIgnoreCase('yes') }">
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</j:if>
@@ -277,7 +277,7 @@
<pathelement location="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no')}">
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no') and !context.getVariable('maven.test.excludeXmlApis').toString().trim().equalsIgnoreCase('yes') }">
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</j:if>
@@ -362,7 +362,7 @@
<pathelement location="${maven.build.dest}"/>
<path refid="maven.dependency.classpath"/>
<pathelement path="${plugin.getDependencyPath('junit')}"/>
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no')}">
<j:if test="${!context.getVariable('maven.junit.fork').toString().trim().equalsIgnoreCase('no') and !context.getVariable('maven.test.excludeXmlApis').toString().trim().equalsIgnoreCase('yes') }">
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
</j:if>

View File

@@ -33,3 +33,4 @@ 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.test.excludeXmlApis = no

View File

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

View File

@@ -23,6 +23,9 @@
<author email="dion@multitask.com.au">dIon Gillard</author>
</properties>
<body>
<release version="1.7.1-SNAPSHOT" date="in SVN">
<action dev="brett" type="add" due-to="Eric Hartmann" issue="MPTEST-55">Add maven.test.excludeXmlApis property to avoid duplicated Xerces</action>
</release>
<release version="1.7" date="2005-08-09">
<action dev="carlos" type="add">Added maven.junit.forkmode property</action>
<action dev="carlos" type="update">Allow multiple patterns in testmatchpattern and testnotmatchpattern</action>

View File

@@ -198,6 +198,15 @@ 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>