Skip to content
Sharp

Build Tools · interview question

How can you ensure that a specific Maven profile is active only during a release build?

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

Correct answer

D. Use the -P flag with the profile name during the release command

Why

Using the -P flag with the profile name allows you to activate a specific Maven profile during a release build. This targeted activation ensures that only the desired configurations are applied during the release process.

Test yourself on Build Tools

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

Start free test
All Build Tools questions →