1、命令

mvn deploy:deploy-file -DgroupId=com.ebc -DartifactId=sloth_core -Dversion=1.1.3 -Dpackaging=jar -DpomFile=pom.xml -Dfile=sloth_core-1.1.3.jar -Durl=http://10.156.211.21:8081/repository/maven-releases/ -DrepositoryId=nexus-releases
  • 加上-DpomFile=pom.xml,否则上传到私服上的pom.xml是空的
  • -DrepositoryId=nexus-releases对应的是settings.xml中的server下的id

2、settings.xml

<server>
  <id>nexus-snapshots</id>  
  <username>admin</username>  
  <password>xxx</password>
</server>

 

相关文章:

  • 2022-03-06
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-09-05
  • 2022-01-25
猜你喜欢
  • 2021-08-16
  • 2022-12-23
  • 2021-10-17
  • 2021-07-15
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案