Build Tools · interview question
How would you explain a common strategy to manage transitive dependency conflicts in a Maven project in an interview?
Multiple choiceMediumchapter-10-curatedpremiumbuild-toolsdependency-management
Answer and explanation
Correct answer
B. Use a specific version in the project's pom.xml
Why
In Maven, you can manage transitive dependency conflicts by specifying a particular version of the dependency in your project's pom.xml. This ensures that the specified version is used, resolving any version conflicts.
Test yourself on Build Tools
A free test with instant, explained results. No account needed.
More Build Tools questions
- In a Maven project, where do you declare a dependency for a new library you want to use?
- Which Maven command would you use to ensure that the project is cleaned and rebuilt, including tests?
- When using Maven, which phase is responsible for verifying the quality of the code by running integration tests?
- In a Maven project, how are dependencies typically fetched?
- How does Maven resolve dependencies that are not present in the local repository?
- Which of the following is a primary benefit of using Gradle over Ant for building Java projects?