Skip to content
Sharp

Build Tools · interview question

In a Maven multi-module project, how can you ensure that a module builds its artifact only if its dependencies' tests pass?

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

Correct answer

D. Ensure dependencies are listed in the <dependencies> section

Why

In Maven, ensuring that a module's dependencies' tests pass is managed by listing them under the <dependencies> section. Maven will ensure that dependent modules are built and tested before the module itself.

Test yourself on Build Tools

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

Start free test
All Build Tools questions →