- Maven Essentials
- Prabath Siriwardena
- 215字
- 2021-07-30 10:11:28
Maven repositories
The magic behind how Maven finds and loads dependent jars for a given Maven project is Maven repositories. In the corresponding pom.xml
file of your Maven project, under the <dependencies>
element, you can define references to all the dependent jar files required to build your project successfully. Each dependency defined in the pom.xml
file is identified uniquely using Maven coordinates. Maven coordinates uniquely identify a project, a dependency, or a plugin defined in a POM. Each entity is uniquely identified by the combination of a group identifier, an artifact identifier, and version (and, of course, with the packaging and the classifier). Maven coordinates are discussed in detail in Chapter 2, Understanding the Project Object Model (POM). Once Maven finds out all the required dependencies for a given project, it loads them to the local file system of Maven repositories, and adds them to the project classpath.
By convention, Maven uses http://repo.maven.apache.org/maven2 as the repository. If all the artifacts required to build the project are present in this repository, then those will be loaded into the local file system or the local Maven repository, which is, by default, at USER_HOME/.m2/repository
. You can add custom repositories at the project level under the <repositories>
element of the pom.xml
file or at the global level under the MAVEN_HOME/conf/settings.xml
file.
- PHP動(dòng)態(tài)網(wǎng)站程序設(shè)計(jì)
- Visual C++程序設(shè)計(jì)學(xué)習(xí)筆記
- 你必須知道的204個(gè)Visual C++開發(fā)問題
- STM32F0實(shí)戰(zhàn):基于HAL庫開發(fā)
- 軟件架構(gòu):Python語言實(shí)現(xiàn)
- PLC編程與調(diào)試技術(shù)(松下系列)
- 基于ARM Cortex-M4F內(nèi)核的MSP432 MCU開發(fā)實(shí)踐
- ASP.NET程序開發(fā)范例寶典
- 小程序,巧應(yīng)用:微信小程序開發(fā)實(shí)戰(zhàn)(第2版)
- UML2面向?qū)ο蠓治雠c設(shè)計(jì)(第2版)
- 區(qū)塊鏈項(xiàng)目開發(fā)指南
- Struts 2.x權(quán)威指南
- C++程序設(shè)計(jì)教程
- Photoshop智能手機(jī)APP界面設(shè)計(jì)
- HTML5游戲開發(fā)實(shí)戰(zhàn)