maven自动部署到私服

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxxxx-api: Failed to deploy artifacts: Could not transfer artifact com.xxxxx:xxxxx-api:jar:1.0-20161102.111438-3 from/to snapshots (http://100.00.00.00:8081/nexus/content/repositories/snapshots): Failed to transfer file: http://100.00.00.00:8081/nexus/content/repositories/snapshots/com/xxxxx/xxxxx-api/1.0-SNAPSHOT/xxxxx-api-1.0-20161102.111438-3.jar. Return code is: 401, ReasonPhrase: Unauthorized. -> [Help 1]

这样子部署报上面的错误,一直部署不到私服上面,找了找资料才知道,需要在maven中的setting.xml中添加

<server>
        <id>snapshots</id>
        <username>admin</username>
        <password>admin123</password>
    </server>
    <server>
        <id>releases</id>
        <username>admin</username>
        <password>admin123</password>
    </server>

  </servers>

其中<id>需要与主pom.xml中的<snapshotRepository><id>一致,<username><password>需要根据公司权限配置

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值