Install Maven Artifacts

Azure DevOps Services | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018

With Azure Artifacts, you can publish and restore Maven packages to/from your Azure Artifacts feed. In this article, we will be covering how to restore your packages from an Azure Artifacts feed.

Prerequisites

Connect to feed

  1. From within your project, select Artifacts, and then select your feed.

  2. Select Connect to feed.

    Screenshot showing how to connect to your feed

  3. Select Maven.

    Screenshot showing how to connect to Maven feeds.

  4. If this is the first time using Azure Artifacts with Maven, select Get the tools button and follow the instructions to download and install the prerequisites.

    1. Download Maven.
    2. Install Maven.
  5. Follow the instructions in the Project setup section to set up your config files and generate a new personal access token.

    Screenshot showing how to set up Maven projects.

Note

The <id> tags in your settings.xml and pom.xml files must be the same.

Restore Maven packages

Run the following command in an elevated command prompt to download your Maven packages. Maven automatically downloads all your dependency to your local repository when the build command is executed.

mvn build