1
0

Use maven-failsafe-plugin to run the tests, as this plugin is bound to the "integration-test" phase which comes after the "package" phase. This is what commons-logging needs for most of its tests.

The normal "test" phase is handled by maven-surefire-plugin. We "disable" that by only running a single test class, one that can be run at the "test" phase. This a hack. To do it the Maven way would mean renaming all integration test source files. But, because we still have an Ant build to maintain I prefer to make as few changes as possible.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@1370536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dennis Lundberg
2012-08-07 21:27:52 +00:00
parent 960adb8ed9
commit c453d4e95a

25
pom.xml
View File

@@ -319,25 +319,38 @@ under the License.
<!-- <!--
- Many of JCL's tests use tricky techniques to place the generated - Many of JCL's tests use tricky techniques to place the generated
- JCL jarfiles on the classpath in various configurations. This means - JCL jarfiles on the classpath in various configurations. This means
- that the tests must be run *after* the "package" build phase. The - that those tests must be run *after* the "package" build phase.
- normal test phase is therefore disabled here, and the test plugin -
- rebound to the "integration-test" phase instead. - In order to not mess with the Ant build we "disable" the normal test
- phase. This is done by only running a single test, one that does not
- need to be run after the "package" phase.
--> -->
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<configuration> <configuration>
<includes> <includes>
<include>**/AvalonLoggerTestCase.java</include> <include>**/AvalonLoggerTestCase.java</include>
<include>**/WeakHashTableTestCase.java</include>
</includes> </includes>
</configuration> </configuration>
</plugin>
<plugin>
<!--
- Many of JCL's tests use tricky techniques to place the generated
- JCL jarfiles on the classpath in various configurations. This means
- that those tests must be run *after* the "package" build phase.
-
- For this we use the failsafe plugin which is bound to the
- "integration-test" phase by default.
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<id>integration-test</id> <id>integration-test</id>
<phase>integration-test</phase>
<goals> <goals>
<goal>test</goal> <goal>integration-test</goal>
<goal>verify</goal>
</goals> </goals>
<configuration> <configuration>
<includes> <includes>