Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DevOps Server 2019
With Azure Artifacts, you can seamlessly publish and restore Maven packages from feeds and public registries. Azure Artifacts supports upstreaming from Maven Central, Google Maven Repository, Gradle Plugins, and JitPack. This guide will walk you through the process of setting up your Maven project and connecting to your Azure Artifacts feed.
Prerequisites
An Azure DevOps organization. Create one for free.
An Azure DevOps project. Create a new project if you don't have one already.
An Azure Artifacts feed. Create one for free.
Project setup
Sign in to your Azure DevOps collection, and then navigate to your project.
Select Artifacts, and then select your feed.
Select Connect to Feed, and then select Maven from the left navigation pane.
Select Generate Maven Credentials and add the credentials to your user settings.xml file inside the
<servers>tag. Your file should look like the following example:<servers> <server> <id>server-2019-defaultcollection-demo</id> <username><FEED_NAME></username> <password>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</password> </server> </servers>Add the second snippet to your project's pom.xml inside both the
<repositories>and<distributionManagement>tags. Your file should look like the following example:<repositories> <repository> <id>server-2019-defaultcollection-demo</id> <url>http://<SERVER_NAME>/<COLLECTION_NAME>/_packaging/<FEED_NAME>/maven/v1</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <distributionManagement> <repository> <id>server-2019-defaultcollection-demo</id> <url>http://<SERVER_NAME>/<COLLECTION_NAME>/_packaging/<FEED_NAME>/maven/v1</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> </distributionManagement>
Note
If your settings.xml file is shared within your team, you can use Maven to encrypt your passwords.