0

我在 vsts 构建中遇到错误。我按照此处提到的相同步骤进行操作,但没有运气。

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

[编辑]:添加 CI 构建日志

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]

请忽略包名称,我已经用虚拟名称覆盖。

4

1 回答 1

1

最后我能够在微软支持的帮助下解决这个问题。这是解决方案:

在 vsts 构建定义的 Maven 任务中,如果我们选择“Authenticate built-in Maven feeds”选项,那么我们不需要在 Options 下提供“-s settings.xml”

在此处输入图像描述

去掉选项下的“-s settings.xml”后;构建成功完成。

在此处输入图像描述

于 2017-11-01T23:07:47.390 回答