[英]Jetty doesn't start in pre-integration-test phase (Maven)
I'm trying to use Maven Failsafe Plugin to run my functional/integration tests, according to this guide: http://docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing , chapter Using the Maven Failsafe Plugin to run Integration Tests 根据此指南,我正在尝试使用Maven故障安全插件运行我的功能/集成测试: http : //docs.codehaus.org/display/MAVENUSER/Maven+and+Integration+Testing , 使用Maven故障安全插件一章运行集成测试
However, jetty doesn't start in the pre-integration-test phase and thus all the tests fail. 但是,码头并不是在集成前测试阶段就开始的,因此所有测试都失败了。 Is there any problem in the following POM configuration:
以下POM配置中是否有任何问题:
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.7.1</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.7</version>
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
<maxIdleTime>3600000</maxIdleTime>
</connector>
</connectors>
<contextPath>/</contextPath>
<scanIntervalSeconds>3</scanIntervalSeconds>
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/webapp/WEB-INF</directory>
<excludes>
<exclude>**/*.jsp</exclude>
<exclude>**/*.html</exclude>
</excludes>
<includes>
<include>**/*.page</include>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</scanTargetPattern>
</scanTargetPatterns>
<execution>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run-exploded</goal>
</goals>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
<execution>
<id>stop-jetty</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</execution>
</configuration>
</plugin>
I run the integration tests by mvn verify
我通过
mvn verify
运行集成测试
我知道为什么-首先,我将execution
标签放在另一个execution
标签中(而不是executions
),然后此executions
块不应该在configuration
标签中,而应该在configuration
标签之外,即plugin
标签中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.