I am using Maven 2.2.1 and to build my project I used this command
mvn clean install -Dmaven.test.skip=true
However, the build failed sayin
There is a difference between each parameter.
The -DskipTests skip running tests phase, it means at the end of this process you will have your tests compiled.
The -Dmaven.test.skip=true skip compiling and running tests phase.
As the parameter -Dmaven.test.skip=true skip compiling you don't have the tests artifact.
For more information just read the surfire documentation: http://maven.apache.org/plugins-archives/maven-surefire-plugin-2.12.4/examples/skipping-test.html