I am new to Maven and searching for the related tutorials.
Can anyone explain me the maven dependency. What is the meaning of maven dependency and where to get it
How to use Maven in Project?
What is maven dependency and how to use it in project?
Thanks
Hi,
I will try to explain you these topics:
What is Maven Dependency?
In Maven Dependency is simple the jar files of a library. For Example your application is connecting to the MySQL Server Using JDBC then you nee the MySQL JDBC driver jar file. This jar file is called dependency.
Similarly in your project you can use many different libraries and you have to include jar files of all those libraries. In maven these dependent libraries are called dependencies and you define these dependencies in the pom.xml file of your project.
For example following is the dependency of awssdk:
<dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>dynamodb</artifactId> </dependency>
An in the pom.xml file you have to add this inside
Where to get dependencies?
Once you define the dependencies in your pom.xml file, Maven will automatically download the required jar files from the Maven central repository (in most of the cases).
The Maven central repository is on the Internet and its publicly available without any charge.
If you are new and trying to learn Maven then check our tutorial at Maven Tutorials section.
Thanks
Ads