External libraries
Different lists of the most used third-party non-JCL libraries include between 20 and 100 libraries. In this section, we are going to discuss those libraries that are included in the majority of such lists. All of them are open source projects.
org.junit
The org.junit
package is the root package of an open source testing framework’s JUnit. It can be added to the project as the following pom.xml
dependency:
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
The scope
value in the preceding dependency tag tells Maven to include the library .jar
file, but only when the test code is going to be run, not in the production .jar
file of the application. With the dependency in place, you can create a test. You...