- Building RESTful Web Services with Spring 5(Second Edition)
- Raja CSP Raman Ludovic Dewailly
- 200字
- 2021-06-30 19:13:26
Understanding POM dependencies
Maven helps manage the third-party libraries in your operating system. In the olden days, you might have had to copy each third-party library into your project manually. This could be a big problem when you had more than one project. Maven avoids this third-party libraries management confusion by keeping all libraries in a central place for each operating system. Regardless of your project count, the third-party libraries will be downloaded to the system only once.
Maven repositories can be found at https://mvnrepository.com/.
Every operating system has their own local Maven repository location:
- Windows Maven central repository location:
C:\Users\<username>\.m2\repository\ - Linux Maven central repository location:
/home/<username>/.m2/repository - MAC Maven central repository location:
/Users/<username>/.m2/repository
Whenever you add a third-party library to your POM dependency, the specified JAR and related files will be copied into the location \.m2\repository.
We will learn about the Maven dependency structure by looking at one sample. Let's assume that we need to use Log4j version 2.9.1 in our application. In order to use it, we need to add the dependency to our project. We can search the log4j-core dependency from https://mvnrepository.com and copy the dependency into our POM under dependencies.
A sample Maven dependency is as follows:

- 網絡云百問百答
- 網絡協議工程
- 物聯網短距離無線通信技術應用與開發
- Oracle SOA Suite 11g Performance Tuning Cookbook
- OpenLayers Cookbook
- 網絡互聯技術(實踐篇)
- PLC、現場總線及工業網絡實用技術速成
- 物聯網技術與應用
- Spring 5.0 Projects
- 網管員必讀:網絡管理(第2版)
- 5G技術與標準
- Learning Node.js Development
- Implementing NetScaler VPX?
- 數字王國里的虛擬人:技術、商業與法律解讀
- Enterprise ApplicationDevelopment with Ext JSand Spring