Bird
0
0

Given this pom.xml snippet, what will happen when you run mvn clean install?

medium📝 component behavior Q13 of 15
Spring Boot - Fundamentals
Given this pom.xml snippet, what will happen when you run mvn clean install?
<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
AOnly the JPA API will be included, no implementation
BThe project will fail because version is missing
CThe project will include JPA support and related libraries automatically
DThe dependency will be ignored without a scope tag
Step-by-Step Solution
Solution:
  1. Step 1: Understand Spring Boot starter dependencies

    Spring Boot starters manage versions internally, so explicit version is not needed if parent is set.
  2. Step 2: Recognize what spring-boot-starter-data-jpa provides

    It includes JPA API and an implementation like Hibernate automatically.
  3. Final Answer:

    The project will include JPA support and related libraries automatically -> Option C
  4. Quick Check:

    Spring Boot starters handle versions and implementations [OK]
Quick Trick: Spring Boot starters bundle needed libs and versions [OK]
Common Mistakes:
  • Thinking version tag is always required
  • Assuming only API without implementation
  • Believing scope tag is mandatory for dependencies

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Spring Boot Quizzes