Punith Kumar P R
Punith Kumar P R

Reputation: 11

mvn command to skip surefire tests is not working

I'm running this command:

mvn clean verify -U -Dskip.surefire=true -Dskip.integration=true -Pwipedb

but it gives me this error:

Unknown lifecycle phase ".surefire=true". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin
-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, gener
ate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate
-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [Help 1]

I tried alternative command:

mvn clean verify -U -DskipTests=true -DskipITs=true -Pwipedb

but this didn't skip tests.

Upvotes: 1

Views: 68

Answers (1)

Mar-Z
Mar-Z

Reputation: 4828

This is the correct syntax:

mvn -DskipTests <build_phase or plugin:goal>

Upvotes: 1

Related Questions