views:

710

answers:

2

I am using Jetty and Selenium to automate some unit tests from my Maven 2. We only really want to run these tests as part of the CI build and would like to control it via the -Dmaven.test.skip property.

I cannot find a way to apply this to the executions for the Jetty plugin. Am I missing something obvious?

A: 

see http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin

Michael Lange
This link just refers me to the documentation which does not actually cover the use case.
bmatthews68
hmm there is the automatic execution example (as part of test process) and if there is no test process (with -skip...) well then there is no jetty startup for it
Michael Lange
+2  A: 

The maven.test.skip property is a property that the surefire plugin looks at to decide if it should just skip. The jetty plugin doesn't care at all about this property. The only way to do this would move your jetty plugin execution to a profile and try activating it if the maven.test.skip property is false.

Brian Fox
This doesn't work if the -Dmaven.test.skip is omitted. It means that the solution is to create a profile specifically for the CI server and specify that as part of the build instruction.
bmatthews68