Complete the code to add the JUnit 5 dependency groupId in the Maven POM file.
<dependency> <groupId>[1]</groupId> <artifactId>junit-jupiter</artifactId> <version>5.9.3</version> <scope>test</scope> </dependency>
The correct groupId for JUnit 5 is org.junit.jupiter. This identifies the JUnit Jupiter project in Maven repositories.
Complete the code to specify the artifactId for JUnit 5 Jupiter engine in the Maven POM file.
<dependency> <groupId>org.junit.jupiter</groupId> <artifactId>[1]</artifactId> <version>5.9.3</version> <scope>test</scope> </dependency>
The artifactId junit-jupiter includes the API and engine for writing and running JUnit 5 tests.
Fix the error in the version tag to use the latest stable JUnit 5 version.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>[1]</version>
<scope>test</scope>
</dependency>The latest stable version of JUnit 5 as of now is 5.9.3. Versions like 4.13.2 belong to JUnit 4, and 6.0.0 does not exist yet.
Fill both blanks to add the Maven scope and the correct tag to include JUnit 5 dependency.
<dependency> <groupId>org.junit</groupId> <artifactId>junit-jupiter</artifactId> <version>5.9.3</version> <[1]>[2]</[1]> </dependency>
The scope tag defines when the dependency is used. For JUnit tests, the scope should be test so it is only used during testing.
Fill all three blanks to complete a Maven POM snippet that adds JUnit 5 dependency with groupId, artifactId, and version.
<dependency> <groupId>[1]</groupId> <artifactId>[2]</artifactId> <version>[3]</version> <scope>test</scope> </dependency>
The correct Maven dependency for JUnit 5 uses org.junit.jupiter as groupId, junit-jupiter as artifactId, and 5.9.3 as the version.