Skip to content

Conversation

@raych1
Copy link
Member

@raych1 raych1 commented Feb 5, 2026

Resolved #47751

Key changes:

  • The SYSTEM_ACCESSTOKEN variable is set as env variables to provide the authentication token

  • Updated eng/settings.xml to configure Maven to use the SYSTEM_ACCESSTOKEN environment variable for authenticating and mirror settings

  • Modified all parent POMs (azure-sdk-parent, azure-client-sdk-parent, azure-client-sdk-parent-v2) and separated service's POMs to remove references to Sonatype OSSRH and use the Azure Artifacts Maven feed as the central repository

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the Azure SDK for Java build infrastructure from using Sonatype OSSRH to Azure Artifacts (CFS) for Maven package resolution and distribution. The changes ensure that all Maven builds authenticate with Azure Artifacts using Azure DevOps system access tokens.

Changes:

  • Updated Maven parent POMs to use Azure Artifacts as the central repository
  • Configured Maven settings.xml with mirror and authentication for Azure Artifacts
  • Added SYSTEM_ACCESSTOKEN environment variable to pipeline jobs and Maven tasks

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
sdk/parents/clientcore-parent/pom.xml Updated repositories, pluginRepositories, and distributionManagement to use Azure Artifacts feed
sdk/parents/azure-sdk-parent/pom.xml Updated repositories and pluginRepositories to use Azure Artifacts feed
sdk/parents/azure-client-sdk-parent/pom.xml Updated repositories, pluginRepositories, and distributionManagement to use Azure Artifacts feed
sdk/parents/azure-client-sdk-parent-v2/pom.xml Updated repositories, pluginRepositories, and distributionManagement to use Azure Artifacts feed
sdk/clientcore/annotation-processor/pom.xml Removed duplicate repository/distributionManagement configurations (now inherited from parent)
eng/settings.xml Configured Maven mirror and server authentication using SYSTEM_ACCESSTOKEN environment variable
eng/pipelines/templates/variables/globals.yml Added SYSTEM_ACCESSTOKEN global variable for pipeline authentication
eng/pipelines/templates/steps/run-and-validate-linting.yml Removed obsolete comment
eng/pipelines/templates/steps/build-and-test.yml Added SYSTEM_ACCESSTOKEN to all Maven task environments
eng/pipelines/templates/steps/build-and-test-native.yml Added SYSTEM_ACCESSTOKEN to all Maven task environments
eng/pipelines/templates/jobs/native.live.tests.yml Added SYSTEM_ACCESSTOKEN job variable
eng/pipelines/templates/jobs/live.tests.yml Added SYSTEM_ACCESSTOKEN job variable
eng/pipelines/templates/jobs/ci.yml Added SYSTEM_ACCESSTOKEN job variables to Build and Analyze jobs
eng/pipelines/templates/jobs/build-validate-pom.yml Added SYSTEM_ACCESSTOKEN job variable

@raych1 raych1 requested a review from joshfree as a code owner February 5, 2026 02:22
@raych1
Copy link
Member Author

raych1 commented Feb 5, 2026

@srnagar @alzimmermsft based on my search in the java repo, there is only one package references the snapshot version, i.e. microsoft-azure-batch. Could you evaluate whether we can replace it by a released version?

@alzimmermsft
Copy link
Member

@raych1, unfortunately there isn't a replacement for microsoft-azure-batch, nor a GA version of azure-mgmt-resources that has a test-jar containing the APIs Batch needs.

@raych1 raych1 self-assigned this Feb 5, 2026
@raych1 raych1 moved this from 🤔 Triage to 🔬 Dev in PR in Azure SDK EngSys 📆🎇 Feb 5, 2026
jdkVersionOption: $(JavaBuildVersion)
jdkArchitectureOption: 'x64'
publishJUnitResults: false
env:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? Can't we just do an authenticate step?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<id>central</id>
<name>Azure Artifacts Maven Mirror</name>
<url>https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-java/maven/v1</url>
<mirrorOf>*,!confluent</mirrorOf>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weshaggard this is the only place using the confluent upstream which is not available in azure artifacts. Let me ask maven CFS support if we can add it to upstream source.

<url>https://packages.confluent.io/maven/</url>

The Credential provider docs also suggests using MavenAuthenticate@0 task in pipeline scenarios.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: 🔬 Dev in PR

Development

Successfully merging this pull request may close these issues.

Switch to using CFS for packages resoution

3 participants