Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
679 views
in Technique[技术] by (71.8m points)

maven - What does mavenAuthenticateFeed do in the Azure DevOps MavenTask?

From the MS docs: https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/maven?view=azure-devops

mavenFeedAuthenticate Authenticate built-in Maven feeds (Required) Automatically authenticate Maven feeds from Azure Artifacts. If built-in Maven feeds are not in use, deselect this option for faster builds. Default value: false Argument aliases: mavenAuthenticateFeed

But everytime I want to use a Maven feeds from Azure Artifacts and I try this by setting mavenFeedAuthenticate to true I always get 401 (Unauthorized).

Could someone please show me the correct usage of this value?

question from:https://stackoverflow.com/questions/65876628/what-does-mavenauthenticatefeed-do-in-the-azure-devops-maventask

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Please refer to this doc to check if you have given Contributor/Owner role to identities: Project Collection Build Service ({OrgName}) and {Project Name} Build Service ({Org Name}) as this doc described.

In addition, this mavenFeedAuthenticate argument in the Maven task is set to false by default, which means that Azure Pipelines will automatically authenticate Maven feeds from Azure Artifacts in the backend. But if it is set to true, we need to specify PAT with full scopes in settings.xml and add file path pointing to this settings.xml for authentication in Options menu in this Maven task.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...