-DskipTests

A Maven command-line property that builds and packages the project without running the tests.

In more detail

-D sets a property for the build, and the Surefire plugin reads skipTests. The course uses it when packaging inside a container because the tests have already run earlier in the pipeline. Using it to hide failing tests defeats the point of having them.

Example

./mvnw -B -ntp package -DskipTests

Related terms

Taught in

References