I have maven profile set for testing where in pre-integration-tests maven starts two jetty servers and afterwards tests are started. The problem I\'ve stumbled into is in the se
I have created a maven-sleep-plugin once. Not sure how much it works now, you can try and let us know.
Usage (after checking out the source and building):
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-sleep-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>sleep-5-seconds</id>
<phase>pre-integration-test</phase>
<goals>
<goal>sleep</goal>
</goals>
<configuration>
<delay>5</delay>
</configuration>
</execution>
</executions>
</plugin>
You can do it with the help of the maven antrun plugin. Something like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<configuration>
<tasks>
<sleep seconds="5" />
</tasks>
</configuration>
<executions>
<execution>
<id>sleep-for-a-while</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
EDIT: In case someone will catch this. Based on the comment from jl, tasks have indeed been deprecated and here is the same thing based on using targets instead. Sligthly reorganized but has the same function.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>sleep-for-a-while</id>
<phase>pre-integration-test</phase>
<configuration>
<target>
<sleep seconds="5" />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>