Bird
0
0

You added this dependency to your pom.xml but get a build error:

medium📝 Debug Q14 of 15
Spring Boot - Fundamentals
You added this dependency to your pom.xml but get a build error:
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-web</artifactId>
  <version>2.3.0.RELEASE</version>
</dependency>
What is the likely cause?
AIncorrect groupId spelling
BMissing <code>scope</code> tag causes build failure
CDependency must be in <code>build</code> section, not <code>dependencies</code>
DVersion conflicts because Spring Boot parent manages versions
Step-by-Step Solution
Solution:
  1. Step 1: Understand Spring Boot parent version management

    Spring Boot starter parent manages dependency versions automatically.
  2. Step 2: Identify problem with manually specifying version

    Manually adding version can cause conflicts and build errors.
  3. Final Answer:

    Version conflicts because Spring Boot parent manages versions -> Option D
  4. Quick Check:

    Let parent manage versions to avoid conflicts [OK]
Quick Trick: Avoid manual versions if using Spring Boot starter parent [OK]
Common Mistakes:
  • Adding version manually when parent manages it
  • Thinking scope is required for starters
  • Misplacing dependencies outside dependencies

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes