maven項目如何從私服nexus中下載依賴包


maven項目如何從私服nexus中下載依賴包

 

解決方法:

1.打開maven的config目錄中settings.xml文件

2.在<profile></profiles>之間添加以下代碼:

   <profile>

           <id>central</id>

           <repositories>

               <repository>

                   <id>central</id>

                   <url>http://gisserver2:9081/nexus/content/groups/public/</url>

                   <releases>

                       <enabled>true</enabled>

                   </releases>

                   <snapshots>

                       <enabled>true</enabled>

                   </snapshots>

               </repository>

           </repositories>

    </profile>

3.在<profile></profiles>后面添加以下代碼(使配置文件始終處於活動狀態):  

  <activeProfiles>

       <activeProfile>central</activeProfile>

   </activeProfiles>


免責聲明!

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



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