Talking about replacing Maven image with Alibaba cloud central warehouse (fine)

preface

Every time I update Maven project, I look at the progress bar and feel very uncomfortable, which obviously hinders my enthusiasm for learning. Maven warehouse is in foreign countries by default, so it is inevitably slow to use. Especially when downloading and relying on it, you can change it to a domestic image, which makes you feel like flying. Domestic Maven images are supported by Alibaba cloud, open source China, etc. here it is replaced by Alibaba cloud.

replace

Modify Maven configuration file settings XML (of course, you can also add a settings. XML file under the user home directory. M2)

Just add a mirror child node to the mirrors node, as follows:

Just save.

Conclusion

Well, start enjoying 100 times the download speed

―――――――――――――――――――― gorgeous dividing line ――――――――――――――――――-

tips:

Download archetype catalog XML file, delete unused skeletons and keep the commonly used ones.

A '^ m' - archetypecatalog is added to specify Maven archetype plugin to read archetype catalog Location of the XML file:

Internal -- built in Maven archetype plugin

Local -- local, the location is ~ / m2/archetype-catalog. xml

Remote -- the catalog pointing to Maven's central warehouse

After modifying the alicloud image, if the command 'MVN archetype: generate - darchetypecatalog = local' cannot be used

Just.

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>