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:
31
pom.xml
31
pom.xml
@@ -156,7 +156,7 @@ under the License.
|
||||
- The custom test framework requires the unit test code to be
|
||||
- in a jarfile so it can control its place in the classpath.
|
||||
-->
|
||||
<plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<configuration>
|
||||
@@ -265,7 +265,7 @@ under the License.
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<!--
|
||||
@@ -319,25 +319,38 @@ under the License.
|
||||
<!--
|
||||
- Many of JCL's tests use tricky techniques to place the generated
|
||||
- JCL jarfiles on the classpath in various configurations. This means
|
||||
- that the tests must be run *after* the "package" build phase. The
|
||||
- normal test phase is therefore disabled here, and the test plugin
|
||||
- rebound to the "integration-test" phase instead.
|
||||
- that those tests must be run *after* the "package" build phase.
|
||||
-
|
||||
- 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>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<includes>
|
||||
<include>**/AvalonLoggerTestCase.java</include>
|
||||
<include>**/WeakHashTableTestCase.java</include>
|
||||
</includes>
|
||||
</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>
|
||||
<execution>
|
||||
<id>integration-test</id>
|
||||
<phase>integration-test</phase>
|
||||
<goals>
|
||||
<goal>test</goal>
|
||||
<goal>integration-test</goal>
|
||||
<goal>verify</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<includes>
|
||||
@@ -393,7 +406,7 @@ under the License.
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>release</id>
|
||||
|
||||
Reference in New Issue
Block a user