其他分享
首页 > 其他分享> > 如何将项目发布到nexus

如何将项目发布到nexus

作者:互联网

将项目发布到maven私服操作步骤如下:
1. 配置maven的settings.xml文件(要在idea工具中引入的maven的settings.xml文件中配置 )
  <server>
  <id>releases</id>
  <username>admin</username>   
  <password>admin123</password>
  </server>
  <server>
  <id>snapshots</id>
  <username>admin</username>
  <password>admin123</password>
  </server>

2. 配置项目的pom.xml文件(id是在server中配的id,url为仓库的url)
<distributionManagement>
  <repository>
     <id>releases</id>
       <url>http://localhost:8081/nexus/content/repositories/releases/</url>
  </repository>
  <snapshotRepository>
     <id>snapshots</id> 
       <url>http://localhost:8081/nexus/content/repositories/snapshots/</url>  
   </snapshotRepository>
</distributionManagement>

3. 执行mvn deploy命令

标签:xml,releases,项目,nexus,admin123,snapshots,maven,发布
来源: https://www.cnblogs.com/codegzy/p/14828711.html