Skip to content

Instantly share code, notes, and snippets.

@mgencur
Created October 13, 2011 10:40
Show Gist options
  • Save mgencur/1283938 to your computer and use it in GitHub Desktop.
Save mgencur/1283938 to your computer and use it in GitHub Desktop.
antrun_usage
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<!-- this ant script runs testng natively -->
<id>wait-for-application</id>
<phase>pre-integration-test</phase>
<configuration>
<tasks>
<echo message="Waiting for ${selenium.browser.url}/${example.context.path}" />
<waitfor maxwait="1" maxwaitunit="minute" checkevery="5000">
<http url="${selenium.browser.url}/${example.context.path}" errorsBeginAt="404"/>
</waitfor>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<!-- this ant script runs testng natively -->
<id>stop-selenium</id>
<phase>post-integration-test</phase>
<configuration>
<tasks>
<echo taskname="selenium-shutdown" message="DGF Errors during shutdown are expected" />
<get taskname="selenium-shutdown"
src="http://${selenium.server.host}:${selenium.server.port}/selenium-server/driver/?cmd=shutDownSeleniumServer"
ignoreerrors="true" dest="${selenium.log.dir}/selenium.stop.msg" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<!-- undeploy the example now in the event of being a directory (exploded) -->
<id>undeploy-exploded</id>
<phase>post-integration-test</phase>
<configuration>
<tasks>
<delete dir="${jboss.home}/server/${jboss.domain}/deploy/${example.context.path}.war" failonerror="false" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment