Challenge - 5 Problems
POM.xml Dependency Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Understanding Dependency Scope in POM.xml
In a Spring Boot project, what is the effect of setting a dependency's scope to
provided in the POM.xml?Attempts:
2 left
💡 Hint
Think about dependencies provided by the runtime environment like a servlet container.
✗ Incorrect
Dependencies with provided scope are needed to compile the project but are expected to be supplied by the runtime environment, so they are not packaged in the final artifact.
❓ component_behavior
intermediate2:00remaining
Effect of Missing Spring Boot Starter Dependency
What happens if you omit the
spring-boot-starter-web dependency in your Spring Boot POM.xml but try to create a REST controller?Attempts:
2 left
💡 Hint
Consider what the starter web dependency provides.
✗ Incorrect
The spring-boot-starter-web includes embedded Tomcat and Spring MVC. Without it, the app lacks web server classes and fails to start.
📝 Syntax
advanced2:00remaining
Identify the Correct Dependency Declaration
Which POM.xml dependency snippet correctly adds the Spring Boot Starter Data JPA dependency?
Attempts:
2 left
💡 Hint
Check groupId spelling and if version is needed explicitly.
✗ Incorrect
Spring Boot manages versions for starters, so version tag is optional if using parent POM. GroupId must be exactly org.springframework.boot.
🔧 Debug
advanced2:00remaining
Diagnose Dependency Conflict in POM.xml
You added two dependencies:
spring-boot-starter-web and spring-boot-starter-webflux. Your app fails to start with a bean creation error. What is the likely cause?Attempts:
2 left
💡 Hint
Think about the difference between traditional MVC and reactive web frameworks.
✗ Incorrect
spring-boot-starter-web uses Spring MVC, while spring-boot-starter-webflux uses reactive programming. Including both causes conflicts in web server beans.
❓ state_output
expert2:00remaining
Resulting Dependency Tree Size
If your Spring Boot POM.xml includes only
spring-boot-starter-web and spring-boot-starter-data-jpa, approximately how many direct and transitive dependencies will Maven download?Attempts:
2 left
💡 Hint
Consider that starters bring many libraries transitively.
✗ Incorrect
Each Spring Boot starter pulls many dependencies transitively. Together, these two starters typically bring around 60 dependencies.