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