Skip to content
Sharp

Build Tools · interview question

How can you configure a Maven project to skip a specific module's tests when running the build?

Multiple choiceHardchapter-10-curatedpremiumbuild-toolsbuild-lifecycle
Choose one answer
Answer and explanation

Correct answer

A. Use the -DskipTests flag

Why

The -DskipTests flag can be used to skip tests during the build process. However, this skips tests for all modules, not just a specific one. To skip tests for a single module, you should configure it in the module's pom.xml file.

Test yourself on Build Tools

A free test with instant, explained results. No account needed.

Start free test
All Build Tools questions →