將maven倉庫改為阿里倉庫


為了證明我還活着,寫一篇Maven換ali倉庫

一 找文件

 

二 加點料

 1 <mirrors>
 2     <!-- mirror
 3      | Specifies a repository mirror site to use instead of a given repository. The repository that
 4      | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
 5      | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
 6      |
 7     <mirror>
 8       <id>mirrorId</id>
 9       <mirrorOf>repositoryId</mirrorOf>
10       <name>Human Readable Name for this Mirror.</name>
11       <url>http://my.repository.com/repo/path</url>
12     </mirror>
13      -->
14     
15       
16     <mirror>
17         <id>alimaven</id>
18         <mirrorOf>*</mirrorOf>
19         <name>aliyun maven</name>
20         <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
21     </mirror>
22 
23   
24   </mirrors>
View Code

三 重點在這里(添加的主要內容)

<mirror>
        <id>alimaven</id>
        <mirrorOf>*</mirrorOf>
        <name>aliyun maven</name>
        <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
 </mirror>

四 保存文件(ok)

五 更新索引

 

六  祝大家六六六

個人網站:http://www.tonyplot.xyz/


免責聲明!

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



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