I am making my application up in the pre-integration-test phase and then the integration test cases run using the failsafe plugin. I want to ensure that my application is up and running in the pre-integration-test phase before the integration test cases are executed.
I got two probable ways to achieve this :
- Maven-antrun-plugin
<waitfor maxwait="100" maxwaitunit="second" checkevery="500">
<http url="https://localhost/myapp/index.html"/>
</waitfor>
- exec-maven-plugin
<execution>
<id>wait</id>
<phase>pre-integration-test</phase>
<configuration>
<executable>sleep</executable>
<arguments>
<argument>100</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
Is there any other way to achieve this OR any other maven plugin to achieve the same functionality ?