Refactor jumbled tests by moving to a multiproject layout for testing.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@116240 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
epugh 2004-11-16 10:27:56 +00:00
parent dca4a3705c
commit f91db5539d
9 changed files with 315 additions and 248 deletions

View File

@ -0,0 +1,190 @@
<!--
/*
* 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.
*/
-->
<project xmlns:j="jelly:core"
xmlns:assert="assert"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<goal name="testPlugin" prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates,test-classpath-con-entry,test-classpath-no-resources">
</goal>
<goal name="test-init">
<j:set var="dotProject" value="${basedir}/.project"/>
<j:set var="dotClasspath" value="${basedir}/.classpath"/>
<attainGoal name="eclipse:clean"/>
</goal>
<goal name="test-eclipse">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countJUnit" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/junit/jars/junit-3.8.1.jar')])"/>
<assert:assertEquals expected="1" value="${countJUnit.intValue().toString()}" msg="JUnit dependency not found"/>
<x:set var="countCactus" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/cactus/jars/cactus-13-1.6.1.jar')])"/>
<assert:assertEquals expected="1" value="${countCactus.intValue().toString()}" msg="Only one Cactus dependency should be found"/>
</goal>
<goal name="test-natures">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.projectnatures" value="n1,a.b.c.n2"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<assert:assertEquals expected="n1" value="${natures[1].text}" msg="n1 is not the second nature"/>
<assert:assertEquals expected="a.b.c.n2" value="${natures[2].text}" msg="a.b.c.n2 is not the third nature"/>
</goal>
<goal name="test-builders">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.buildcommands" value="c1,c2,c3"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="builders" select="$projectDoc/projectDescription/buildSpec/buildCommand/name"/>
<assert:assertEquals expected="c1" value="${builders[1].text}" msg="c1 is not the second build command name"/>
<assert:assertEquals expected="c2" value="${builders[2].text}" msg="c2 is not the third build command name"/>
<assert:assertEquals expected="c3" value="${builders[3].text}" msg="c3 is not the fourth build command name"/>
</goal>
<goal name="test-natures-and-builders">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.projectnatures" value="n7,n9,n11"/>
<j:set var="maven.eclipse.buildcommands" value="c11,c21,c31"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<x:set var="builders" select="$projectDoc/projectDescription/buildSpec/buildCommand/name"/>
<!-- check natures -->
<assert:assertEquals expected="n7" value="${natures[1].text}" msg="n7 is not the second nature"/>
<assert:assertEquals expected="n9" value="${natures[2].text}" msg="n9 is not the second nature"/>
<assert:assertEquals expected="n11" value="${natures[3].text}" msg="n11 is not the second nature"/>
<!-- check builders -->
<assert:assertEquals expected="c11" value="${builders[1].text}" msg="c11 is not the second build command name"/>
<assert:assertEquals expected="c21" value="${builders[2].text}" msg="c21 is not the second build command name"/>
<assert:assertEquals expected="c31" value="${builders[3].text}" msg="c31 is not the second build command name"/>
</goal>
<goal name="test-classpath-has-generated-source">
<attainGoal name="test-init"/>
<mkdir dir="${maven.gen.src}/gensrc1"/>
<mkdir dir="${maven.gen.src}/gensrc2"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@kind,'src')])"/>
<j:set var="expectedDirs" value="6"/>
<j:set var="cactusStatus" value="NOT installed"/>
<maven:get plugin="cactus-maven" property="plugin" var="cactusPlugin" />
<j:if test="${! empty(cactusPlugin)}">
<j:set var="expectedDirs" value="${expectedDirs+1}"/>
<!-- I wish someday I will understand why Jelly requires hacks like
the following ... -->
<j:set var="expectedDirs" value="${expectedDirs.intValue().toString()}"/>
<j:set var="cactusStatus" value="installed"/>
</j:if>
<echo>Cactus plugin ${cactusStatus} - expecting ${expectedDirs} source entries.</echo>
<assert:assertEquals expected="${expectedDirs}" value="${count.intValue().toString()}" msg="Wrong number of generated src directories found"/>
</goal>
<goal name="test-classpath-has-overridden-jar">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/maven/jars/maven.jar')])"/>
<assert:assertEquals expected="1" value="${count.intValue().toString()}" msg="override by jar tag not found"/>
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar')])"/>
<assert:assertEquals expected="1" value="${count.intValue().toString()}" msg="maven.jar.override didn't work"/>
</goal>
<goal name="test-noduplicates">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countUniqueSrc" select="count($classpathDoc/classpath/classpathentry[ends-with(@path,'src/main')])"/>
<assert:assertEquals expected="1" value="${countUniqueSrc.intValue().toString()}" msg="Src directory should be added only once"/>
<x:set var="countUniqueSrcTest" select="count($classpathDoc/classpath/classpathentry[ends-with(@path,'src/test')])"/>
<assert:assertEquals expected="1" value="${countUniqueSrcTest.intValue().toString()}" msg="Test directory should be added only once"/>
</goal>
<goal name="test-classpath-con-entry">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.conclasspath" value="org.eclipse.pde.core.requiredPlugins"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countConEntries" select="count($classpathDoc/classpath/classpathentry[contains(@kind,'con')])"/>
<assert:assertEquals expected="2" value="${countConEntries.intValue().toString()}" msg="Classpath entry kind='con' should be added twice, once mandatory, other variable"/>
</goal>
<goal name="test-classpath-no-resources">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="false"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/resources')])"/>
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/resources dir should not be imported"/>
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/test-resources')])"/>
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/test-resources dir should not be imported"/>
</goal>
</project>

View File

@ -0,0 +1,4 @@
cactus.src.dir=${basedir}/src/cactus-test
maven.jar.override=on
maven.jar.commons-dude=${maven.repo.local}/commons-logging/jars/commons-logging-1.0.3.jar
maven.eclipse.resources.addtoclasspath=true

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
* 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.
*/
-->
<project>
<pomVersion>3</pomVersion>
<extend>${basedir}/../project.xml</extend>
<id>test-maven-eclipse-maintest-plugin</id>
<name>Test project for Maven Eclipse Plugin</name>
<dependencies>
<dependency>
<groupId>facts</groupId>
<artifactId>commons-dude</artifactId>
<version>1.0.3</version>
<type>jar</type>
<properties/>
</dependency>
<dependency>
<id>maven</id>
<version>beta-8</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>20030211.142705</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>cactus</groupId>
<artifactId>cactus</artifactId>
<version>13-1.6.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/TestAll.java</include>
</includes>
<resources>
<resource>
<directory>src/test-resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main</directory>
</resource>
</resources>
</unitTest>
<resources>
<resource>
<directory>src/main</directory>
</resource>
<resource>
<directory>src/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/test</directory>
</resource>
</resources>
</build>
</project>

View File

@ -15,176 +15,14 @@
* limitations under the License.
*/
-->
<project xmlns:j="jelly:core"
xmlns:assert="assert"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:x="jelly:xml">
<project xmlns:util="jelly:util" xmlns:j="jelly:core">
<goal name="testPlugin" prereqs="test-eclipse,test-natures,test-builders,test-natures-and-builders,test-classpath-has-generated-source,test-classpath-has-overridden-jar,test-noduplicates,test-classpath-con-entry,test-classpath-no-resources">
</goal>
<goal name="test-init">
<j:set var="dotProject" value="${basedir}/.project"/>
<j:set var="dotClasspath" value="${basedir}/.classpath"/>
<attainGoal name="eclipse:clean"/>
</goal>
<goal name="test-eclipse">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<goal name="testPlugin">
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countJUnit" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/junit/jars/junit-3.8.1.jar')])"/>
<assert:assertEquals expected="1" value="${countJUnit.intValue().toString()}" msg="JUnit dependency not found"/>
<x:set var="countCactus" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/cactus/jars/cactus-13-1.6.1.jar')])"/>
<assert:assertEquals expected="1" value="${countCactus.intValue().toString()}" msg="Only one Cactus dependency should be found"/>
<!-- Generate project artifacts -->
<j:set var="goal" value="testPlugin"/>
<attainGoal name="multiproject:goal"/>
</goal>
<goal name="test-natures">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.projectnatures" value="n1,a.b.c.n2"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<assert:assertEquals expected="n1" value="${natures[1].text}" msg="n1 is not the second nature"/>
<assert:assertEquals expected="a.b.c.n2" value="${natures[2].text}" msg="a.b.c.n2 is not the third nature"/>
</goal>
<goal name="test-builders">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.buildcommands" value="c1,c2,c3"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="builders" select="$projectDoc/projectDescription/buildSpec/buildCommand/name"/>
<assert:assertEquals expected="c1" value="${builders[1].text}" msg="c1 is not the second build command name"/>
<assert:assertEquals expected="c2" value="${builders[2].text}" msg="c2 is not the third build command name"/>
<assert:assertEquals expected="c3" value="${builders[3].text}" msg="c3 is not the fourth build command name"/>
</goal>
<goal name="test-natures-and-builders">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.projectnatures" value="n7,n9,n11"/>
<j:set var="maven.eclipse.buildcommands" value="c11,c21,c31"/>
<attainGoal name="eclipse:generate-project"/>
<assert:assertFileExists file="${dotProject}" />
<u:file var="projectFile" name="${dotProject}"/>
<x:parse var="projectDoc" xml="${projectFile.toURL()}" />
<x:set var="natures" select="$projectDoc/projectDescription/natures/nature"/>
<x:set var="builders" select="$projectDoc/projectDescription/buildSpec/buildCommand/name"/>
<!-- check natures -->
<assert:assertEquals expected="n7" value="${natures[1].text}" msg="n7 is not the second nature"/>
<assert:assertEquals expected="n9" value="${natures[2].text}" msg="n9 is not the second nature"/>
<assert:assertEquals expected="n11" value="${natures[3].text}" msg="n11 is not the second nature"/>
<!-- check builders -->
<assert:assertEquals expected="c11" value="${builders[1].text}" msg="c11 is not the second build command name"/>
<assert:assertEquals expected="c21" value="${builders[2].text}" msg="c21 is not the second build command name"/>
<assert:assertEquals expected="c31" value="${builders[3].text}" msg="c31 is not the second build command name"/>
</goal>
<goal name="test-classpath-has-generated-source">
<attainGoal name="test-init"/>
<mkdir dir="${maven.gen.src}/gensrc1"/>
<mkdir dir="${maven.gen.src}/gensrc2"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@kind,'src')])"/>
<j:set var="expectedDirs" value="6"/>
<j:set var="cactusStatus" value="NOT installed"/>
<maven:get plugin="cactus-maven" property="plugin" var="cactusPlugin" />
<j:if test="${! empty(cactusPlugin)}">
<j:set var="expectedDirs" value="${expectedDirs+1}"/>
<!-- I wish someday I will understand why Jelly requires hacks like
the following ... -->
<j:set var="expectedDirs" value="${expectedDirs.intValue().toString()}"/>
<j:set var="cactusStatus" value="installed"/>
</j:if>
<echo>Cactus plugin ${cactusStatus} - expecting ${expectedDirs} source entries.</echo>
<assert:assertEquals expected="${expectedDirs}" value="${count.intValue().toString()}" msg="Wrong number of generated src directories found"/>
</goal>
<goal name="test-classpath-has-overridden-jar">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/maven/jars/maven.jar')])"/>
<assert:assertEquals expected="1" value="${count.intValue().toString()}" msg="override by jar tag not found"/>
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'MAVEN_REPO/commons-logging/jars/commons-logging-1.0.3.jar')])"/>
<assert:assertEquals expected="1" value="${count.intValue().toString()}" msg="maven.jar.override didn't work"/>
</goal>
<goal name="test-noduplicates">
<attainGoal name="test-init"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countUniqueSrc" select="count($classpathDoc/classpath/classpathentry[ends-with(@path,'src/main')])"/>
<assert:assertEquals expected="1" value="${countUniqueSrc.intValue().toString()}" msg="Src directory should be added only once"/>
<x:set var="countUniqueSrcTest" select="count($classpathDoc/classpath/classpathentry[ends-with(@path,'src/test')])"/>
<assert:assertEquals expected="1" value="${countUniqueSrcTest.intValue().toString()}" msg="Test directory should be added only once"/>
</goal>
<goal name="test-classpath-con-entry">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.conclasspath" value="org.eclipse.pde.core.requiredPlugins"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="countConEntries" select="count($classpathDoc/classpath/classpathentry[contains(@kind,'con')])"/>
<assert:assertEquals expected="2" value="${countConEntries.intValue().toString()}" msg="Classpath entry kind='con' should be added twice, once mandatory, other variable"/>
</goal>
<goal name="test-classpath-no-resources">
<attainGoal name="test-init"/>
<j:set var="maven.eclipse.resources.addtoclasspath" value="false"/>
<attainGoal name="eclipse"/>
<assert:assertFileExists file="${dotProject}" />
<assert:assertFileExists file="${dotClasspath}" />
<u:file var="classpathFile" name="${dotClasspath}"/>
<x:parse var="classpathDoc" xml="${classpathFile.toURL()}" />
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/resources')])"/>
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/resources dir should not be imported"/>
<x:set var="count" select="count($classpathDoc/classpath/classpathentry[contains(@path,'src/test-resources')])"/>
<assert:assertEquals expected="0" value="${count.intValue().toString()}" msg="The src/test-resources dir should not be imported"/>
</goal>
</project>

View File

@ -1,4 +1,23 @@
cactus.src.dir=${basedir}/src/cactus-test
maven.jar.override=on
maven.jar.commons-dude=${maven.repo.local}/commons-logging/jars/commons-logging-1.0.3.jar
maven.eclipse.resources.addtoclasspath=true
# -------------------------------------------------------------------
# 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.
# -------------------------------------------------------------------
# MUST specify these, even though they are the defaults, so we can run inside reactor where they were already set
maven.multiproject.basedir=${basedir}
maven.multiproject.includes=*/project.xml
maven.multiproject.excludes=

View File

@ -37,82 +37,8 @@
<url>http://maven.apache.org/reference/plugins/eclipse/</url>
<siteDirectory>/www/maven.apache.org/reference/plugins/eclipse/</siteDirectory>
<repository>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/eclipse/</connection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/eclipse/</url>
<connection>scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven-plugins/eclipse/src/plugin-test</connection>
<url>http://cvs.apache.org/viewcvs/maven-plugins/eclipse/src/plugin-test</url>
</repository>
<developers>
<developer>
<name>dIon Gillard</name>
<id>dion</id>
<email>dion@multitask.com.au</email>
<organization>Multitask Consulting</organization>
<roles>
<role>Documentation</role>
</roles>
</developer>
</developers>
<dependencies>
<dependency>
<groupId>facts</groupId>
<artifactId>commons-dude</artifactId>
<version>1.0.3</version>
<type>jar</type>
<properties/>
</dependency>
<dependency>
<id>maven</id>
<version>beta-8</version>
<jar>maven.jar</jar>
</dependency>
<dependency>
<groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-xml</artifactId>
<version>20030211.142705</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>cactus</groupId>
<artifactId>cactus</artifactId>
<version>13-1.6.1</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main</sourceDirectory>
<unitTestSourceDirectory>src/test</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/TestAll.java</include>
</includes>
<resources>
<resource>
<directory>src/test-resources</directory>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main</directory>
</resource>
</resources>
</unitTest>
<resources>
<resource>
<directory>src/main</directory>
</resource>
<resource>
<directory>src/resources</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/test</directory>
</resource>
</resources>
</build>
</project>