---
title: "maven deploy 已存在的包的时候出现400错误"
author: "primernd"
date: "2014-05-12T17:54:53Z"
tags: []
categories: ["开源软件"]
slug: "maven-deploy-400"
draft: false
lastmod: "2014-05-12T17:54:53Z"
id: 2065480
url: "https://primernd.iteye.com/blog/2065480"
---

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project PRIME\_SMM\_APIService: Failed to deploy artifacts: Could not transfer artifact com.prime.smm.apiservice:PRIME\_SMM\_APIService:jar:1.0.0 from/to PRIME-RELEASE (http://192.168.8.201:8081/nexus/content/repositories/PRIME-RELEASE/): Failed to transfer file: http://192.168.8.201:8081/nexus/content/repositories/PRIME-RELEASE/com/prime/smm/apiservice/PRIME\_SMM\_APIService/1.0.0/PRIME\_SMM\_APIService-1.0.0.jar. Return code is: 400, ReasonPhrase: Bad Request. -&gt; \[Help 1]

 

maven deploy 已存在的包的时候出现400错误

原因是 release 默认库是不允许重复部署的  
![](http://dl2.iteye.com/upload/attachment/0097/0405/97e1c9a3-dcf5-3921-872f-69942b7736df.png)

 

修改图中配置就可以重复部署了

Deployment Policy:Allow Redeploy  
![](http://dl2.iteye.com/upload/attachment/0097/0409/4da6f0b4-e583-3719-9b67-d285b2d6313c.png)