Use packages from Maven Central
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019 | TFS 2018
With upstream sources, you can use both private packages you've created and public packages from Maven Central. When you enable upstream sources in your feed, Azure Artifacts will save a copy of any packages you install from Maven central. Azure Artifacts also support other Maven upstream sources such as Google Maven Repository, Gradle Plugins, and JitPack.
Note
Maven snapshots are not supported with Maven upstream sources.
Enable upstream sources
Follow the instructions below to create a new feed and enable upstream sources:
Select Artifacts, and then select Create Feed.
Give your feed a Name and choose its visibility (who can view packages in this feed), upstream sources, and scope (project-scoped or organization-scoped) settings.
Select Create when you're done.
Note
By default, the Project Collection Build Service (org-scoped) and the project-level Build Service (project-scoped) are set to Collaborator when you create a new feed.
Azure Artifacts comes pre-installed in TFS 2018. If this is the first time using your feed, you might be asked to assign a license
Go to Build & Release and select Packages.
Select + New feed.
Give your feed a Name, a Description, and set up who can read, who can contribute and if you want to Include external packages.
Select Create when you're done.
Add Maven Central upstream
Select the
in the top right of the page to access your feed's settings.
Select Upstream sources.
Select Add Upstream.
Select Public source, and then select Maven Central (https://repo.maven.apache.org/maven2/) from the dropdown menu.
Select Save when you are done.
Select Save to save your changes.
View saved packages
You can view the packages you saved from upstreams by selecting the Maven Central source from the dropdown menu.
Tip
If Maven is not downloading all your dependencies, run the following command from the project directory to regenerate your project's files:
mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true
Related articles
Feedback
Submit and view feedback for