maven之私服配置deploy及上传命令

maven deploy
http://www.blogjava.net/libin2722/articles/332876.html

maven setting.xml文件
http://www.360doc.com/content/12/0403/14/834950_200481342.shtml

【第一种】pom.xml配置
pom.xml的配置,部署的路径
<distributionManagement>
<repository>
<id>nexus</id>
<name>releases</name>
<url>http://nexus.mgt.pangu365.com/content/repositories/releases</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>releases</name>
<url>http://nexus.mgt.pangu365.com/content/repositories/snapshots</url>
<uniqueVersion>false</uniqueVersion>
</snapshotRepository>
</distributionManagement>
<repositories>
<repository>
<id>Nexus</id>
<name>Nexus Public Repository</name>
<url>http://nexus.mgt.pangu365.com/content/groups/public/</url>
</repository>
</repositories>

【第二种】{m2_home}/conf/setting.xml配置
setting.xml
<servers>
<!-- id就是库的ID -DrepositoryId-->
<!--
<server>
<id>nexus</id>
<username>deployment</username>
<password>deployment123</password>
</server>
-->
</servers>

<mirrors>
<!--
此行不配置,写在pom中也可以
<mirror>
<id>nexus</id>
<mirrorOf> * </mirrorOf>
<url>http://nexus.mgt.pangu365.com/content/groups/public/</url>
</mirror>
-->
</mirrors>

【deploy命令】
mvn deploy:deploy-file -DgroupId=com.sun -DartifactId=tools -Dversion=1.4.2 -Dpackaging=jar -Dfile=/application/search/tools-1.4.2.jar -Durl=http://nexus.mgt.pangu365.com/content/repositories/thirdparty -DrepositoryId=nexus -X

其中-DrepositoryId=nexus就是服务器中 ${M2_HOME}/conf/setting.xml中,配置用户名密码的id
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值