Recall & Review
beginner
What is a Maven dependency?
A Maven dependency is a library or tool your project needs to work. Maven downloads and manages these automatically for you.
Click to reveal answer
beginner
Where do you add dependencies in a Maven project?
You add dependencies inside the <dependencies> section of the pom.xml file in your project.
Click to reveal answer
beginner
Show the Maven dependency snippet to add JUnit 5.
org.junit.jupiter
junit-jupiter
5.10.0
test
Click to reveal answer
beginner
What does the test tag mean in a Maven dependency?
It means the dependency is only used when running tests, not in the main application.
Click to reveal answer
beginner
Why is it helpful to use Maven dependencies?
Maven downloads the right versions for you, avoids conflicts, and makes your project easy to share and build on any computer.
Click to reveal answer
Where do you add a Maven dependency?
✗ Incorrect
Maven dependencies are declared inside the pom.xml file.
What does the test tag do in a Maven dependency?
✗ Incorrect
The test scope means the dependency is used only when running tests.
Which groupId is correct for JUnit 5 in Maven?
✗ Incorrect
JUnit 5 uses the groupId 'org.junit.jupiter'.
What file does Maven use to manage dependencies?
✗ Incorrect
Maven uses pom.xml to manage project dependencies.
Why use Maven dependencies instead of manually adding jars?
✗ Incorrect
Maven automatically downloads and manages correct versions, avoiding conflicts.
Explain how to add JUnit 5 as a dependency in a Maven project.
Think about the XML tags and where they go in the project file.
You got /4 concepts.
Why is managing dependencies with Maven better than adding jar files manually?
Consider what happens when you share your project with others.
You got /4 concepts.