使用國內阿里maven私服方法


方法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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM