方法1,在maven的config下setings.xml文件中加入以下代码


  1. <mirrors>
  2. <mirror>
  3. <id>mirrorId</id>
  4. <mirrorOf>repositoryId</mirrorOf>
  5. <name>Human Readable Name for this Mirror.</name>
  6. <url>http://my.repository.com/repo/path</url>
  7. </mirror>
  8. </mirrors>

方法2,在pom.xml加入以下代码


  1. <!--第三方maven私服-->
  2. <repositories>
  3. <repository>
  4. <id>nexus-aliyun</id>
  5. <name>Nexus aliyun</name>
  6. <url>http://maven.aliyun.com/nexus/content/groups/public</url>
  7. <releases>
  8. <enabled>true</enabled>
  9. </releases>
  10. <snapshots>
  11. <enabled>false</enabled>
  12. </snapshots>
  13. </repository>
  14. </repositories>
  15. <pluginRepositories>
  16. <pluginRepository>
  17. <id>nexus-aliyun</id>
  18. <name>Nexus aliyun</name>
  19. <url>http://maven.aliyun.com/nexus/content/groups/public</url>
  20. <releases>
  21. <enabled>true</enabled>
  22. </releases>
  23. <snapshots>
  24. <enabled>false</enabled>
  25. </snapshots>
  26. </pluginRepository>
  27. </pluginRepositories>

原文地址:https://blog.csdn.net/xingfeichen/article/details/54290735

最新文章

  1. linux的相关指令命令
  2. Mysql在大型网站的应用架构演变
  3. jquery学习方法
  4. SpringMVC——接收请求参数和页面传参
  5. Struts2+Spring+Ibatis集成合并
  6. 在 win 10 中使用sql 2012 附加低版本数据失败的解决办法。
  7. CentOS6.5 服务器+apache5.3绑定多个域名+SELinux设置
  8. 在suse上折腾iptables
  9. 对Java原子类AtomicInteger实现原理的一点总结
  10. 从vultr购买到搭ss看世界
  11. 【noip模拟】最小点覆盖
  12. 在go中使用linked channels进行数据广播
  13. JS获取访客IP+判断归属地+自动跳转
  14. 随便说说sequelize的问题
  15. 解决selenium.common.exceptions.WebDriverException: Message: &#39;chromedriver&#39; executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
  16. python之封装
  17. ethereum/EIPs-100 挖矿难度计算
  18. Spark学习之路 (三)Spark之RDD
  19. iframe 常见问题 解析
  20. D - I Think I Need a Houseboat(1.3.1)

热门文章

  1. MaxCompute Spark开发指南
  2. git 报错:没有权限 remote: error: unable to unlink old &#39;README.md&#39; (Permission denied)
  3. OWIN启动类检测
  4. java 3 接口与多态&amp;输入输出流
  5. 三.BP神经网络
  6. WCF ChannelFactory
  7. HTML 5适合小公司,适合在大平台上做内容
  8. Leetcode806.Number of Lines To Write String写字符串需要的行数
  9. Kubernetes1.4即将发布
  10. poj3308 最小割