Maven分发管理的Azure管道问题,以在Maven构建期间访问Azure工件并显示错误消息(未经授权的401) [英] Azure pipeline issue with maven distribution management to access azure artifact during maven build with error message (Unauthorized 401)

查看:100
本文介绍了Maven分发管理的Azure管道问题,以在Maven构建期间访问Azure工件并显示错误消息(未经授权的401)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在尝试使用使用maven选项的DevOps管道来构建MuleSoft项目,并且正在使用Arifacts->连接到供稿以获取版本库.为了实现这一点,我执行了以下步骤.

I am trying to build MuleSoft project using DevOps pipeline using maven option and I am using Arifacts -> connect to feed for release repo. In order to achieve that I did the following steps.

1.我从工件"选项卡下的连接到提要"中复制了生成的凭据"("Maven"选项卡),并将其放入maven settings.xml中,还复制了Azure URL的存储库详细信息,并将其添加到项目的pom.xml中以进行分发管理和一样 settings.xml用于依赖项Maven工件访问.

1. I copied the 'generated credential' (maven tab) from 'connect to feed' under 'Artifacts' tab and placed it into maven settings.xml and also copied the repository details of Azure URL and add it project's pom.xml for distribution management and same in settings.xml for dependency maven artifact access.

2.然后,我构建了第一个m子项目,并在构建"作为管道的一部分成功完成之后,将生成的jar"部署到Azure工件中.

2. Then, I built the 1st mule project and after 'build' finished successfully as part of a pipeline, it 'deploy 'the generated jar into the Azure Artifacts.

3.然后,我尝试构建另一个项目,该项目对上述jar具有maven依赖性,并且应该使用与上一步部署中相同的凭据从相同的Azure Artifacts访问它.但是不幸的是这失败了 并显示未经授权"访问权限的错误.验证帐户后,我会将错误日志添加为图片,以供参考.

3. Then, I tried to build another project which has maven dependency on the aforementioned jar and is supposed to access it from the same Azure Artifacts using the same credential as it is done in the previous step to deploy. But unfortunate this is failing with an error saying 'Unauthorized' access. I will add the error log as image for reference when my account is verified.

注意:生成的凭据已从Azure aritifacts->连接到供稿"->"Maven"中复制并放置在settings.xml中的服务器"部分下.

Note: Credential generated has been copied from Azure aritifacts->Connect to feed->Maven and placed under servers section in settings.xml.

存储库URL部分放置在一个配置文件下,该配置文件具有与上述服务器ID相同的ID.

The repository URL part is placed under a profile which has same ID as the server id mentioned above.

我想知道我是否做错什么,因为Azure能够使用与maven用来获取依赖项jar相同的凭据来构建和放置jar.

I would like to know whether I am doing anything wrong as Azure is able to build and place jar with the same credential which maven is using to fetch the dependency jar.

任何帮助将不胜感激.

致谢

推荐答案

开发者社区,请获取有关的建议 堆栈溢出.

The query posted by you has not reached the right forum. In order to assist best on your query, I would suggest you to report any problems on Developer Community, get advice on Stack Overflow.

这将帮助您更快地回复您的查询.

span>

If this answer was helpful, click "Mark as Answer" or "Up-Vote". To provide additional feedback on your forum experience, click here


这篇关于Maven分发管理的Azure管道问题,以在Maven构建期间访问Azure工件并显示错误消息(未经授权的401)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆