如何将项目发布到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命令
上一篇:Visual Studio 2019本地不能运行Azure Functions


下一篇:Spring Cloud服务短路Netflix Hystrix