如果要部署项目到远程仓库,

方法一:配置pom.xml:

<distributionManagement>   
<repository>
<id>releases</id>
<name>Internal Releases</name>
<url>http://localhost:8081/nexus/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>Snapshots</id>
<name>Internal Snapshots</name>
<url>http://localhost:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
这时候用 mvn deploy就可以把项目发布至远程仓库里了

方法二:
部署jar至nexus命令:
mvn deploy:deploy-file -DgroupId=com.xxx.biz.common -DartifactId=xxxx -Dversion=1.0 -Dpackaging=jar -Dfile=e:\test.jar -Durl=[url] -DrepositoryId=[id]
应用示例:替换绿色部分即可
mvn deploy:deploy-file -DgroupId=com.xxxx.biz.common -DartifactId=biz-common -Dversion=1.2.4 -Dpackaging=jar -Dfile=C:test.jar -Durl=http://192.xxx.x.xx:8081/nexus/content/repositories/snapshots -DrepositoryId=nexus-snapshots

相关文章:

  • 2021-10-04
  • 2021-09-20
  • 2021-06-02
  • 2021-08-16
  • 2021-06-24
  • 2021-12-13
猜你喜欢
  • 2022-12-23
  • 2021-04-29
  • 2021-04-02
  • 2021-05-22
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
相关资源
相似解决方案