What are the Maven warehouses?
This article mainly talks about "what are the Maven warehouses?". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn what Maven warehouses have.
Warehouse classification
1. Local warehouse
The local repository is the dependent repository that developers have downloaded locally or packaged all the jar packages themselves. The path of the local repository is configured in the conf/settings.xml configuration file corresponding to maven.
You can see that the default local path is ${user.home} / .m2 / repository, which can also be modified.
2. Central warehouse
The central warehouse, which is the default download address of maven, is maintained by maven. The default address of the central warehouse is: http://repo1.maven.org/maven2, which is set in the source configuration file of maven.
Since there are three different types of repositories, it is important to understand their download process.
As can be seen from the above flow chart, when updating the project dependency, first query from the local warehouse. If the local warehouse is directly compiled, if it cannot be found, then go to the central warehouse to query or private server query according to the configuration. If the private server is available, it will be returned directly. If the private server is not available, go to the central warehouse to download it and save it to the private server before returning.
At this point, I believe you have a deeper understanding of "Maven warehouse", you might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!