Exclude Tests from Maven build

java, junit, maven, maven-3

Solution

Try with:

mvn clean install -DskipTests

Source Maven Surefire Plugin - Skipping Tests.

Problem

When I am running `maven clean install` it always executes all tests in `src/test/java` is there a way to skip all the tests, just to run simple build without any tests. I want my tests to be in `src/test/java` but I want to tell maven to do not execute them. I've been looking for something like that on the internet but I did not manage to find the answer. Is there a way to do this?

Original source

Related problems