Maven Configure alicloud image
Why we download jar So slowly
maven By default, it will be downloaded from the central warehouse jar package , The warehouse is abroad , And people all over the world will download it from here , So the download speed must be very slow .
The solution uses mirrors
What is mirror image ？
When you look in the mirror, the person in the mirror is the mirror image
The mirror image is a copy of the central warehouse , The content is exactly the same as the central warehouse , At present, there are many domestic mirror images , Among them, Alibaba cloud is relatively stable , At the same time, it can guarantee the download speed .
In fact, we can simply understand what mirror image is ：
If the warehouse A Can provide warehouse B Everything stored , Then we can think of A yes B A mirror image of . let me put it another way , Any one can come from the warehouse Y Acquired components , It's hard to get from its mirror image .
there A Namely ： Alibaba cloud image （ In fact, there are other images OSChina）, and B Namely ：Maven The central warehouse
stay maven Of setting.xml Middle configuration
<mirrors> <mirror> <id>alimaven</id> <name>aliyun maven</name> <url>http://maven.aliyun.com/nexus/content/groups/public/</url> <mirrorOf>central</mirrorOf> </mirror> </mirrors>
It just needs to be locally maven Under the installation position conf Under folder setting.xml Medium
The above steps are related to alicloud image configuration , If you can help, please also like to pay attention to support , If you have any questions, please comment , This blog focuses on data structure, algorithms and java Development , operating system , computer network , Friends who think my article is helpful can pay attention to me , If you have any questions, please comment on your personal message , Meeting is fate , See you from high