Integration tests will not start (Failsafe, Maven)

I am trying to use the Maven Failsafe Plugin to run my integration tests with this configuration:

<plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>2.7.1</version> <executions> <execution> <id>integration-test</id> <goals> <goal>integration-test</goal> </goals> </execution> <execution> <id>verify</id> <goals> <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> </configuration> <executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> <goals> <goal>run-war</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> </executions> </plugin> 

Everything is fine until Jetty is launched during the pre-integration phase. Then nothing happens, as if he was waiting for something. The last line says:

[INFO] Started Jetty Server

How can I start the tests right away? I start maven using mvn verify .

+6
source share
2 answers

Changing the version of the maven berth plug-in from 6.1.7 to 6.1.26 allowed everything.

+2
source

For people who are still looking for a solution, I had the same problem and I solved it by replacing

 <goals> <goal>run-war</goal> </goals> 

by

 <goals> <goal>start</goal> </goals> 

This works because run * blocks execution, and start does not block.

+2
source

All Articles