Coordinates and repositories in maven

A build and coordinates
The build passes the coordinates as its unique identifier.
Coordinates are usually composed of the following three elements.
<groupId>com.cakin24.maven01</groupId>
<artifactId>maven01-model</artifactId>
<version>0.0.1SNAPSHOT</version>
 
Second warehouse
Used to manage project dependencies, warehouses are divided into two types: local warehouses and remote warehouses: local warehouses and remote warehouses.
If the dependency is not found in the local warehouse, it will go to the global central warehouse to find it. After finding it, it will be downloaded to the local warehouse. If not found, an error will be reported.
Global central warehouse address: https://repo.maven.apache.org/maven2
 
Configuration method of three mirror warehouses
1 There is a settings.xml file under the conf file in the Maven installation directory, edit the file.
2 Insert the following code snippet into the file
<mirror>
    <id>net-cn</id>
    <mirrorOf>central</mirrorOf>
    <name>Human Readable Name for this Mirror.</name>
</mirror>
 
Four change warehouse location
The default storage location of the warehouse: C:\Users\lenovo\.m2\repository
1 There is a settings.xml file under the conf file in the Maven installation directory, edit the file.
2 Insert the following code snippet into the file
<localRepository>F:/java/repo</localRepository>

 

3 Copy the settings.xml file to the F:\java\repo directory

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326909777&siteId=291194637