I would like to start and stop jetty with maven.
This is my setup http://nopaste.info/61ef12198d.html
With mvn jetty:run my jetty starts locally but when I want to run jetty in test-phase with mvn -Pselenium test jetty doesn't run.
I would like to start and stop jetty with maven.
This is my setup http://nopaste.info/61ef12198d.html
With mvn jetty:run my jetty starts locally but when I want to run jetty in test-phase with mvn -Pselenium test jetty doesn't run.
My guess would be that you would have to bind an execution of jetty:run to a phase that runs before test. My guess would be process-test-classes. See Maven Lifecycle Reference.
The "Maven way" would be to run your Selenium tests during the integration-test phase and to start and stop Jetty respectively during the pre-integration-test and post-integration-test phases.
There are several ways to implement such a configuration, see Integration and Functional Testing with Maven 2.0 for one approach.