首页 > 其他 > 详细

Maven中setting修改为阿里的数据源

时间:2020-07-27 17:50:34      阅读:88      评论:0      收藏:0      [点我收藏+]
修改maven中setting配置

找到tomcat中conf下的setting.xml,找到<mirrors>下

? <mirror>
? ? ? <id>mirrorId</id>
? ? ? <mirrorOf>repositoryId</mirrorOf>
? ? ? <name>Human Readable Name for this Mirror.</name>
? ? ? <url>http://my.repository.com/repo/path</url>;
? ? </mirror>

? <mirror>
?? ??? ??? ?<id>nexus-aliyun</id>
?? ??? ??? ?<mirrorOf>*</mirrorOf>
?? ??? ??? ?<name>Nexus aliyun</name>
?? ??? ??? ?<url>http://maven.aliyun.com/nexus/content/groups/public</url>;
?? ?</mirror>
如下:
技术分享图片
然后,添加pom中配置
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>http://maven.aliyun.com/nexus/content/groups/public</url>;
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
保存退出,maven重新加载即可。

Maven中setting修改为阿里的数据源

原文:https://blog.51cto.com/7567511/2513690

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!