最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
mvn deploy部署到nexus的教程详解
时间:2022-06-30 20:58:44 编辑:袖梨 来源:一聚教程网
在使用maven构建模块化项目时,将项目打包发布到中央仓库是很频繁的操作,通过配置可以简化这个过程。
settings.xml配置账号密码
直接部署jar包
mvn deploy:deploy-file -DgroupId=com.renhenet -DartifactId=renhesoa-api -Dversion=1.0.0 -Dpackaging=jar -Dfile=target/renhesoa-api-1.0.0.jar -Durl=http://localhost:8083/content/repositories/thirdparty/ -DrepositoryId=deploymentRepo
DrepositoryId即setting.xml中得server.id
使用deploy插件
添加deploy插件后,执行mvn deploy会报错,如下:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project renhesoa-api: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
提示还需配置distributionManagement,指定DaltDeploymentRepository,如下:
添加源码插件,同步发布源码包
相关文章
- 龙魂旅人为什么会缺极光粉尘 缺极光粉尘原因介绍 08-18
- 四海兄弟故乡什么时候加入XGP 加入XGP可能性分享 08-18
- 诛仙2何时下雨奇遇坐标在哪 何时下雨中原奇遇攻略 08-18
- 龙魂旅人魔物怎么升级和升星 升级和升星方法介绍 08-18
- 四海兄弟故乡探索模式怎么打开 探索模式开启方法介绍 08-18
- 燕云十六声明亮的星任务怎么做-万事知明亮的星任务攻略 08-18