Here are the steps I take to add a new JAR dependency to my Maven project.
๐๐ญ๐๐ฉ 1:
I open my applications pom.xml file
๐๐ญ๐๐ฉ 2:
I recommend to use the properties
section to create a new tag that holds the version number of the JARs you are trying to add. This way, you can control version numbers in a centralized location.
Here is an example:
<properties>
<opentelemetry.version>1.41.0</opentelemetry.version>
</properties>
๐๐ญ๐๐ฉ 3:
I then add the JARs to the section named dependencies
and make sure to use the property created above.
<dependencies>
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-api<artifact-Id>
<version>${opentelemetry.version}</version>
<scope>compile</version>
</dependency>
</dependencies>