天天看點

org.apache.maven deploy 400錯誤

Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project xxx.3rd: Failed to deploy artifacts: Could not transfer artifact com.xxx.xxx-3rd:pom:1.0 from/to nexus-releases (http://xxx.xxx.xx.xx:8081/nexus/content/repositories/releases/): Failed to transfer file: http://xxx.xxx.xx.xx:8081/nexus/content/repositories/releases/com/xxx/xxx/1.0/xxx-3rd-1.0.pom. Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

 最後發現,是因為不允許再次釋出,到nexus背景把 Deployment Policy 改成  Allow Redeploy,

要注意還有可能是repository的id 和 maven setting中id 要對應,要不也會報400錯誤

ok備注哈 ,歡迎通路小站 利多樂