My exclusions from my test configuration in my POM seem to be being
ignored. I am following the following example, to try and setup Unit
Tests and Integration Tests -

http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html

My POM looks like this -

<project xmlns="http://maven.apache.org/POM/4.0.0";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>uk.co.landmark.solutions</groupId>
  <artifactId>SchemaShredder</artifactId>
  <version>2.1</version>
  <packaging>jar</packaging>
  <name>SchemaShredder</name>
  <url>http://maven.apache.org</url>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
                <executions>
                    <execution>
                        <id>unit-tests</id>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <excludes>
                                <exclude>**/systest/**</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>integration-tests</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <includes>
                                <include>**/systest/**</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
         </plugin>
        </plugins>
    </build>
    <dependencies>
...
    </dependencies>
</project>

My project layout looks like this -

/SchemaShredder
/SchemaShredder/src
/SchemaShredder/src/uk/...
/SchemaShredder/test
/SchemaShredder/test/java
/SchemaShredder/test/java/uk/...   (unit tests in here)
/SchemaShredder/test/java/systest/uk/...   (integration-tests in here)
/SchemaShredder/test/resources

For some reason I dont understand when I try and excluse the
integration tests (**/systest/**) from the test phase, it doesnt
exclude them and still tries to execute them.
Also if I change the exclusion to **.java I would expect no tests to
run, but again it seems to ignore the exclusion and run all the tests
still. Help, what am I doing wrong?

Thanks Adam.

-- 
Adam Retter

skype :adam.retter
http://www.adamretter.org.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to