tags:

views:

59

answers:

2

Hi all,

Is there a simple way to not build the test classes?

mvn clean install -Dmaven.test.skip=true

Walter

A: 

Run a phase that doesn't include test-compile, for example compile.

mvn clean compile
Pascal Thivent
+5  A: 

According to the documentation on the Maven Surefire Plugin, your example should skip both compilation and execution of the tests.

Daniel
+1 I hate the naming, however. It's completely non-obvious to me why `skipTests` just skips *executing* the tests and `maven.text.skip` skips *compiling and executing* the tests. I always have to look up which one is which.
Joachim Sauer
I know what you mean! I only knew this answer because I looked at the docs earlier today ;)
Daniel
Wow, I never noticed this subtle difference. Thanks for pointing it out (and +1).
Pascal Thivent
Same here. +1 for the info.
JoseK