本文介绍了VSTS Maven Build Failaure-禁止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在vsts构建中遇到错误。我遵循了
在选项下删除 -s settings.xml之后;构建成功完成。
I am getting below error in vsts build. I followed same steps as mentioned here but no luck.
2017-10-12T15:20:56.2694625Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project mycompany-vault-client: Failed to deploy artifacts: Could not transfer artifact mycompany-vault:mycompany-vault-client:jar:0.0.1-20171012.152055-6 from/to mycompany-dts-visualstudio.com-mycompany.vault.packages (https://mycompany-dts.pkgs.visualstudio.com/_packaging/mycompany.Vault.Packages/maven/v1): Access denied to: https://mycompany-dts.pkgs.visualstudio.com/_packaging/mycompany.Vault.Packages/maven/v1/mycompany-vault/mycompany-vault-client/0.0.1-SNAPSHOT/mycompany-vault-client-0.0.1-20171012.152055-6.jar, ReasonPhrase: Forbidden. -> [Help 1]2017-10-12T15:20:56.2694625Z [ERROR] 2017-1
[Edit]: Added CI Build logs
2017-10-12T15:20:55.0965492Z
2017-10-12T15:20:55.0965492Z Downloaded: https://indus-dts.pkgs.visualstudio.com/_packaging/indus.dtsvault.Packages/maven/v1/indus-dtsvault/indus-dtsvault-client/0.0.1-SNAPSHOT/maven-metadata.xml (747 B at 0.5 KB/sec)
2017-10-12T15:20:55.1121367Z Uploading: https://indus-dts.pkgs.visualstudio.com/_packaging/indus.dtsvault.Packages/maven/v1/indus-dtsvault/indus-dtsvault-client/0.0.1-SNAPSHOT/indus-dtsvault-client-0.0.1-20171012.152055-6.jar
2017-10-12T15:20:55.1278022Z 2/32 KB
2017-10-12T15:20:55.4882462Z 32/32 KB
2017-10-12T15:20:55.4882462Z
2017-10-12T15:20:55.4882462Z Uploading: https://indus-dts.pkgs.visualstudio.com/_packaging/indus.dtsvault.Packages/maven/v1/indus-dtsvault/indus-dtsvault-client/0.0.1-SNAPSHOT/indus-dtsvault-client-0.0.1-20171012.152055-6.pom
2017-10-12T15:20:55.8163616Z 2/3 KB
2017-10-12T15:20:56.1913370Z 3/3 KB
2017-10-12T15:20:56.1913370Z
2017-10-12T15:20:56.1913370Z [INFO] ------------------------------------------------------------------------
2017-10-12T15:20:56.1913370Z [INFO] BUILD FAILURE
2017-10-12T15:20:56.1913370Z [INFO] ------------------------------------------------------------------------
2017-10-12T15:20:56.1913370Z [INFO] Total time: 5.108 s
2017-10-12T15:20:56.2069573Z [INFO] Finished at: 2017-10-12T16:20:56+01:00
2017-10-12T15:20:56.2694625Z [INFO] Final Memory: 10M/193M
2017-10-12T15:20:56.2694625Z [INFO] ------------------------------------------------------------------------
2017-10-12T15:20:56.2694625Z [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project indus-dtsvault-client: Failed to deploy artifacts: Could not transfer artifact indus-dtsvault:indus-dtsvault-client:jar:0.0.1-20171012.152055-6 from/to indus-dts-visualstudio.com-indus.dtsvault.packages (https://indus-dts.pkgs.visualstudio.com/_packaging/indus.dtsvault.Packages/maven/v1): Access denied to: https://indus-dts.pkgs.visualstudio.com/_packaging/indus.dtsvault.Packages/maven/v1/indus-dtsvault/indus-dtsvault-client/0.0.1-SNAPSHOT/indus-dtsvault-client-0.0.1-20171012.152055-6.jar, ReasonPhrase: Forbidden. -> [Help 1]
Pls ignore package name, I have override with dummy name.
解决方案
Finally I was able to fix this issue with the help of Micorosoft support. Here is the solution :
In Maven task of vsts build definition, if we select the option "Authenticate built-in Maven feeds" then we do not need to provide"-s settings.xml" under Options
After removing "-s settings.xml" under options; build completed successfully.
这篇关于VSTS Maven Build Failaure-禁止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!