Hi,
What is the use of maven dependency and how I can add spring-context maven dependency to my Eclipse project?
How it downloads the jar files from Internet?
Thanks
Hi,
Maven is project management tool in Java for managing the complete life cycle of Java project. It uses a pom.xml file for project management where developer can write the library and version to be used in the project. Maven then downloads these library from the Internet maven repository and then include in the project.
In order to use the Maven dependency in your eclipse project you have to convert your project into maven project. Once it is converted you can add maven dependency in your pom.xml file of project.
How it downloads the jar files from Internet?
The maven build tool connects to the maven repository on internet and then downloads the required jar files if it already not present in local repository.
Maven uses the HTTP protocol to connect to the maven repository on Internet and then downloads the jar files required in your project.
Here is the dependency that you can add to include sprint context maven dependency in your project:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>5.1.5.RELEASE</version> </dependency>
You should add the above code in pom.xml file of your project.
Thanks
Ads