mavenAuthenticateFeed 在 Azure DevOps MavenTask 中做什么?

What does mavenAuthenticateFeed do in the Azure DevOps MavenTask?

来自 MS 文档: 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

但每次我想使用来自 Azure Artifacts 的 Maven 提要时,我通过将 mavenFeedAuthenticate 设置为 true 来尝试,我总是得到 401(未授权)。

有人可以告诉我这个值的正确用法吗?

请参考此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描述。

此外,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 中的这个 mavenFeedAuthenticate 参数。