o Getting rid of my cruft.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113493 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a81d886627
commit
9374bda1b3
@ -1,257 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
|
|
||||||
<project xmlns:j="jelly:core"
|
|
||||||
xmlns:u="jelly:util"
|
|
||||||
xmlns:resources="resources"
|
|
||||||
xmlns:define="jelly:define">
|
|
||||||
|
|
||||||
<goal name="test"
|
|
||||||
description="Test the application"
|
|
||||||
prereqs="test:test"/>
|
|
||||||
|
|
||||||
<goal name="test:prepare-filesystem"
|
|
||||||
description="Create the needed directory structure">
|
|
||||||
<mkdir dir="${maven.test.dest}"/>
|
|
||||||
<mkdir dir="${maven.test.reportsDirectory}"/>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<goal name="test:compile"
|
|
||||||
description="Compile the TestCases and TestSuites"
|
|
||||||
prereqs="java:compile,java:jar-resources,test:prepare-filesystem,test:test-resources">
|
|
||||||
|
|
||||||
<j:if test="${unitTestSourcesPresent == 'true'}">
|
|
||||||
|
|
||||||
<path id="junit.classpath">
|
|
||||||
<pathelement path="${maven.build.dest}"/>
|
|
||||||
<path refid="maven.dependency.classpath"/>
|
|
||||||
<pathelement path="${plugin.getDependencyPath('junit')}"/>
|
|
||||||
<pathelement path="${plugin.getDependencyPath('xerces')}"/>
|
|
||||||
<pathelement path="${plugin.getDependencyPath('xml-apis')}"/>
|
|
||||||
</path>
|
|
||||||
|
|
||||||
<javac
|
|
||||||
destdir="${maven.test.dest}"
|
|
||||||
excludes="**/package.html"
|
|
||||||
debug="${maven.compile.debug}"
|
|
||||||
deprecation="${maven.compile.deprecation}"
|
|
||||||
optimize="${maven.compile.optimize}">
|
|
||||||
<classpath refid="junit.classpath"/>
|
|
||||||
<src>
|
|
||||||
<path refid="maven.test.compile.src.set"/>
|
|
||||||
</src>
|
|
||||||
</javac>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<j:if test="${!unitTestSourcesPresent}">
|
|
||||||
<echo>No test source files to compile.</echo>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<goal name="test:test"
|
|
||||||
description="Test the application"
|
|
||||||
prereqs="test:compile">
|
|
||||||
|
|
||||||
<j:if test="${unitTestSourcesPresent == 'true'}">
|
|
||||||
|
|
||||||
<fileScanner var="testCaseScanner">
|
|
||||||
<fileset dir="${pom.build.unitTestSourceDirectory}">
|
|
||||||
<j:forEach var="pat" items="${pom.build.unitTest.includes}">
|
|
||||||
<include name="${pat}"/>
|
|
||||||
</j:forEach>
|
|
||||||
<j:forEach var="pat" items="${pom.build.unitTest.excludes}">
|
|
||||||
<exclude name="${pat}"/>
|
|
||||||
</j:forEach>
|
|
||||||
<!-- KEEP ALL ABSTRACT TESTS FROM BEING RUN! -->
|
|
||||||
<exclude name="**/*AbstractTestCase.java"/>
|
|
||||||
</fileset>
|
|
||||||
</fileScanner>
|
|
||||||
|
|
||||||
<j:forEach var="testCase" items="${testCaseScanner.iterator()}">
|
|
||||||
${testCase}
|
|
||||||
</j:forEach>
|
|
||||||
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<j:if test="${!unitTestSourcesPresent}">
|
|
||||||
<echo>No tests to run.</echo>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<goal name="test:ui"
|
|
||||||
description="Starts the Swing TestRunner front end"
|
|
||||||
prereqs="test:compile">
|
|
||||||
|
|
||||||
<java classname="junit.swingui.TestRunner" fork="yes">
|
|
||||||
<sysproperty key="basedir" value="${basedir}"/>
|
|
||||||
<u:tokenize var="listOfProperties" delim=" ">${maven.junit.sysproperties}</u:tokenize>
|
|
||||||
<j:forEach var="someProperty" items="${listOfProperties}">
|
|
||||||
<sysproperty key="${someProperty}" value="${context.findVariable(someProperty)}"/>
|
|
||||||
</j:forEach>
|
|
||||||
<classpath>
|
|
||||||
<path refid="maven.dependency.classpath"/>
|
|
||||||
<pathelement location="${maven.build.dest}"/>
|
|
||||||
<pathelement location="${maven.test.dest}"/>
|
|
||||||
<pathelement path="${plugin.getDependencyPath('junit')}"/>
|
|
||||||
</classpath>
|
|
||||||
<arg value="-noloading"/>
|
|
||||||
</java>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
|
|
||||||
<goal name="test:single"
|
|
||||||
description="Execute a single test defined using the 'testcase' variable"
|
|
||||||
prereqs="test:compile">
|
|
||||||
|
|
||||||
<j:if test="${unitTestSourcesPresent == 'true'}">
|
|
||||||
|
|
||||||
<j:choose>
|
|
||||||
<j:when test="${empty(testcase)}">
|
|
||||||
<echo>
|
|
||||||
You must define the test case to run via -Dtestcase=classname
|
|
||||||
Example: maven -Dtestcase=MyTest test:single-test
|
|
||||||
</echo>
|
|
||||||
</j:when>
|
|
||||||
|
|
||||||
<j:otherwise>
|
|
||||||
|
|
||||||
<taskdef
|
|
||||||
name="junit"
|
|
||||||
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<junit printSummary="yes"
|
|
||||||
haltonfailure="yes"
|
|
||||||
haltonerror="yes"
|
|
||||||
fork="${maven.junit.fork}"
|
|
||||||
dir="${maven.junit.dir}">
|
|
||||||
|
|
||||||
<sysproperty key="basedir" value="${basedir}"/>
|
|
||||||
<u:tokenize var="listOfProperties" delim=" ">${maven.junit.sysproperties}</u:tokenize>
|
|
||||||
<j:forEach var="someProperty" items="${listOfProperties}">
|
|
||||||
<sysproperty key="${someProperty}" value="${context.findVariable(someProperty)}"/>
|
|
||||||
</j:forEach>
|
|
||||||
<formatter type="xml"/>
|
|
||||||
<formatter type="plain" usefile="false"/>
|
|
||||||
<formatter type="plain" usefile="true"/>
|
|
||||||
|
|
||||||
<classpath>
|
|
||||||
<path refid="maven.dependency.classpath"/>
|
|
||||||
<pathelement location="${maven.build.dest}"/>
|
|
||||||
<pathelement location="${maven.test.dest}"/>
|
|
||||||
<pathelement path="${plugin.getDependencyPath('junit')}"/>
|
|
||||||
</classpath>
|
|
||||||
|
|
||||||
<test name="${testcase}" todir="${maven.test.reportsDirectory}"/>
|
|
||||||
|
|
||||||
</junit>
|
|
||||||
|
|
||||||
</j:otherwise>
|
|
||||||
</j:choose>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<j:if test="${!unitTestSourcesPresent}">
|
|
||||||
<echo>No tests to run.</echo>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
|
|
||||||
<goal name="test:match"
|
|
||||||
description="Execute all the tests matching the given 'testmatch' variable"
|
|
||||||
prereqs="test:compile">
|
|
||||||
|
|
||||||
<j:if test="${unitTestSourcesPresent == 'true'}">
|
|
||||||
|
|
||||||
<j:choose>
|
|
||||||
<j:when test="${empty(testmatch)}">
|
|
||||||
<echo>
|
|
||||||
You must define the test case to run via -Dtestmatch=pattern
|
|
||||||
Example: maven -Dtestmatch=*Foo* test:match-test
|
|
||||||
</echo>
|
|
||||||
</j:when>
|
|
||||||
|
|
||||||
<j:otherwise>
|
|
||||||
|
|
||||||
<taskdef
|
|
||||||
name="junit"
|
|
||||||
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<junit printSummary="yes"
|
|
||||||
haltonfailure="yes"
|
|
||||||
haltonerror="yes"
|
|
||||||
fork="${maven.junit.fork}"
|
|
||||||
dir="${maven.junit.dir}">
|
|
||||||
|
|
||||||
<sysproperty key="basedir" value="${basedir}"/>
|
|
||||||
<u:tokenize var="listOfProperties" delim=" ">${maven.junit.sysproperties}</u:tokenize>
|
|
||||||
<j:forEach var="someProperty" items="${listOfProperties}">
|
|
||||||
<sysproperty key="${someProperty}" value="${context.findVariable(someProperty)}"/>
|
|
||||||
</j:forEach>
|
|
||||||
<formatter type="xml"/>
|
|
||||||
<formatter type="plain" usefile="false"/>
|
|
||||||
<formatter type="plain" usefile="true"/>
|
|
||||||
|
|
||||||
<classpath>
|
|
||||||
<path refid="maven.dependency.classpath"/>
|
|
||||||
<pathelement location="${maven.build.dest}"/>
|
|
||||||
<pathelement location="${maven.test.dest}"/>
|
|
||||||
<pathelement path="${plugin.getDependencyPath('junit')}"/>
|
|
||||||
</classpath>
|
|
||||||
|
|
||||||
<batchtest todir="${maven.test.reportsDirectory}">
|
|
||||||
<fileset dir="${pom.build.unitTestSourceDirectory}">
|
|
||||||
<include name="**/${testmatch}.java"/>
|
|
||||||
</fileset>
|
|
||||||
</batchtest>
|
|
||||||
|
|
||||||
</junit>
|
|
||||||
|
|
||||||
</j:otherwise>
|
|
||||||
</j:choose>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
<j:if test="${!unitTestSourcesPresent}">
|
|
||||||
<echo>No tests to run.</echo>
|
|
||||||
</j:if>
|
|
||||||
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<goal name="test:single-test"
|
|
||||||
description="[deprecated] please use the test:single goal instead">
|
|
||||||
|
|
||||||
<echo>[deprecated] please use the test:single goal instead</echo>
|
|
||||||
|
|
||||||
<attainGoal name="test:single"/>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<goal name="test:match-test"
|
|
||||||
description="[deprecated] please use the test:match goal instead">
|
|
||||||
|
|
||||||
<echo>[deprecated] please use the test:match goal instead</echo>
|
|
||||||
|
|
||||||
<attainGoal name="test:match"/>
|
|
||||||
</goal>
|
|
||||||
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
<!-- T E S T R E S O U R C E S -->
|
|
||||||
<!-- ================================================================== -->
|
|
||||||
|
|
||||||
<goal name="test:test-resources"
|
|
||||||
description="Copy any resources that must be present for run tests"
|
|
||||||
prereqs="test:prepare-filesystem"
|
|
||||||
xmlns:resources="resources">
|
|
||||||
|
|
||||||
<j:if test="${unitTestSourcesPresent == 'true'}">
|
|
||||||
<j:if test="${!pom.build.unitTest.resources.isEmpty()}">
|
|
||||||
<resources:copy
|
|
||||||
resources="${pom.build.unitTest.resources}"
|
|
||||||
todir="${maven.test.dest}"
|
|
||||||
/>
|
|
||||||
</j:if>
|
|
||||||
</j:if>
|
|
||||||
</goal>
|
|
||||||
</project>
|
|
||||||
@ -1,59 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
||||||
<project>
|
|
||||||
|
|
||||||
<pomVersion>3</pomVersion>
|
|
||||||
<id>maven-test-plugin</id>
|
|
||||||
<name>Maven Test Plug-in</name>
|
|
||||||
<currentVersion>1.2-SNAPSHOT</currentVersion>
|
|
||||||
<organization>
|
|
||||||
<name>Apache Software Foundation</name>
|
|
||||||
<url>http://jakarta.apache.org/</url>
|
|
||||||
<logo>http://jakarta.apache.org/turbine/maven/images/jakarta-logo-blue.gif</logo>
|
|
||||||
</organization>
|
|
||||||
<inceptionYear>2001</inceptionYear>
|
|
||||||
<package>org.apache.maven</package>
|
|
||||||
<logo>http://jakarta.apache.org/turbine/maven/images/maven.jpg</logo>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<shortDescription>Java Project Management Tools</shortDescription>
|
|
||||||
|
|
||||||
<url>http://jakarta.apache.org/turbine/maven/reference/plugins/test/</url>
|
|
||||||
<issueTrackingUrl>http://nagoya.apache.org/scarab/servlet/scarab/</issueTrackingUrl>
|
|
||||||
<siteAddress>jakarta.apache.org</siteAddress>
|
|
||||||
<siteDirectory>/www/jakarta.apache.org/turbine/maven/reference/plugins/test/</siteDirectory>
|
|
||||||
<distributionDirectory>/www/jakarta.apache.org/builds/jakarta-turbine-maven/</distributionDirectory>
|
|
||||||
|
|
||||||
<repository>
|
|
||||||
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:jakarta-turbine-maven/src/plugins-build/test/</connection>
|
|
||||||
<url>http://cvs.apache.org/viewcvs/jakarta-turbine-maven/src/plugins-build/test/</url>
|
|
||||||
</repository>
|
|
||||||
|
|
||||||
<developers>
|
|
||||||
</developers>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<id>junit</id>
|
|
||||||
<version>3.8.1</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<id>xml-apis</id>
|
|
||||||
<version>1.0.b2</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<id>xerces</id>
|
|
||||||
<version>2.0.2</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<nagEmailAddress>turbine-maven-dev@jakarta.apache.org</nagEmailAddress>
|
|
||||||
<sourceDirectory>src/java</sourceDirectory>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user