Category Archives: Maven

Maven – Start Jetty Server by Ant task using maven-antrun-plugin

I have the following shell script to start the Jetty Server in my portable web application in Windows.
start_jetty.bat

start java -DSTOP.PORT=8080 -DSTOP.KEY=stop_jetty -jar start.jar
EXIT

Continue reading Maven – Start Jetty Server by Ant task using maven-antrun-plugin

Maven – Using maven-jetty-plugin to Start a webapp of another Maven Module

Normally, the maven-jetty-plugin should be configured in the pom of your Maven webapp project/module. But the project i am working is a legacy Java project with many modules and the webapp module depends on others. so i cannot simply start it due to the build sequence.

What i am going to do is to add an new Maven module for integration test of the Maven webapp module and it would be build in the last module such that all other modules are ready.
Continue reading Maven – Using maven-jetty-plugin to Start a webapp of another Maven Module

Run Selenium in Tapestry Maven Project

If you want to know how to run Selenium in a Maven webapp project, you can refer to the following post.
Selenium – Integrate the Selenium Tests into Maven Build
 

If you are a Tapestry user, the pom.xml in the above article may not work as the webapp cannot be started in the Embedded Jetty (404 Not Found). I am not sure the reason behind but i find a work around to solve the problem. The tricky thing is in the Embedded Jetty configuration in the cargo2-maven-plugin.
Continue reading Run Selenium in Tapestry Maven Project

Selenium – Integrate the Selenium Tests into Maven Build

In this article, i will show you how to integrate the Selenium tests into a Maven webapp project using the selenium-maven-plugin and cargo-maven2-plugin.

In this example, i used JUnit as the testing framework. There is no problem if you use TestNG to replace JUnit. This example is a simple Java webapp Maven project which only shows a simple html page (index.jsp). During the build, a Selenium Server is started with the webapp deployed in the Embedded Jetty. It then runs an Unit Test (Selenium Test) during the Maven integration-test life cycle. Here comes to the code.
Continue reading Selenium – Integrate the Selenium Tests into Maven Build