首先在项目的POM文件中,添置distributionManagement属性;
用于指明项目提交到地方!
Pom.xml设置:
http://host:8080/nexus
是可以連到nexus server的url
<id>nexus</id>
是辨識用的repository id,必須跟下面的settings.xml一致。
<distributionManagement>
<!-- use the following if you're not using a snapshot version. -->
<repository>
<id>nexus</id>
<name>Internal Releases</name>
<url>http://host:8080/nexus/content/repositories/releases</url>
</repository>
<!-- use the following if you ARE using a snapshot version. -->
<snapshotRepository>
<id>nexus</id>
<name>Internal Releases</name>
<url>http://host:8080/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
.settings.xml文件设置:
<id>nexus</id>
是辨識用的repository id,必須跟上面的pom.xml中的一致
<servers>
<server>
<id>nexus</id>
<username>username</username>
<password>password</password>
</server>
<server>
<id>thirdparty</id>
<username>username</username>
<password>password</password>
</server>
</servers>
最后一步,执行deploy命令,实现发布:
mvn deploy
分享到:
相关推荐
Maven deploy到 nexus(csdn)————程序
主要介绍了Maven deploy配置方法详解,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
maven-deploy-plugin-2.8.2.jar
主要介绍了maven deploy时报错的解决方法,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
hudson 安装包 subversion 安装包 maven 包 hudson depoly 插件 UTF-8 BOM去除工具
这样,您可以确保您不会浪费时间在不属于Apache Maven范围的事情上。 假设您的问题不存在,请提交该问题的票证。 清楚地描述问题,包括在出现错误时重现的步骤。 确保填写已知问题的最早版本。 在GitHub上分叉存储...
maven-deploy-plugin-2.7.jar
工程运行环境有研发,测试和生产,不同的运行环境配置不同,maven 打包时指定文件目录,使用指定的文件夹下的配置文件。
NULL 博文链接:https://shansun123.iteye.com/blog/983763
maven : deploy程序包用来快速上传第三方jar包提交成功后会自动生成deploy_config.txt保存url和仓库标识
maven-deploy-plugin-2.4.jar
maven-deploy-plugin-2.0.jar
maven-deploy-plugin-2.5.jar
Demo-Maven-部署
提供了基于Nexus搭建Maven私服所需要的一切资源和个人经验,搭建后可maven deploy 上传自己的jar包。别人如何在自己的maven项目中引用我将单独再上传一份。
官方离线安装包,测试可用。请使用rpm -ivh [rpm完整包名] 进行安装
maven-deploy-plugin-2.3.jar
maven-deploy-plugin-2.2.jar
maven-deploy-plugin-2.1.jar
maven-deploy-plugin-2.2.1.jar