Quantcast

Skip surefire but run failsafe?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Skip surefire but run failsafe?

Nord, James
Hi all,

Is there a way to run failsafe base integration tests but not surefire based unit tests? (using the lifecycle as I still need to generate a lot of sources etc...)

I tried mvn -DskipTests=true -DskipITs=false verify but also this is skipping both surefire and failsafe

[INFO] --- maven-surefire-plugin:2.8.1:test (default-test) @ myproj ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ myproj ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.7.2:integration-test (integration-test) @ myproj ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-source-plugin:2.1:jar-no-fork (attach-sources) @ myproj ---
[INFO]
[INFO] --- maven-source-plugin:2.1:test-jar-no-fork (attach-sources) @ myproj ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.7.2:verify (verify) @ myproj ---
[INFO] Tests are skipped.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

Is there a way to accomplish this?

/James

________________________________

**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the [hidden email] and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Skip surefire but run failsafe?

Ansgar Konermann
Am 19.01.2012 22:39, schrieb Nord, James:
> I tried mvn -DskipTests=true -DskipITs=false verify but also this is skipping both surefire and failsafe

It does so because both plugins support a property named skipTests. If
you set it to false on the command line, both will assume they should
not run any tests.

Configuring m-surefire-plugin using
<skipTests>${skipUnitTests}</skipTests> in its <configuration> section
and setting -DskipUnitTests=true on the maven command line should give
you the desired behaviour.

HTH

Ansgar
*<http://maven.apache.org/plugins/maven-failsafe-plugin/integration-test-mojo.html#skipTests>*

Loading...