Skip to content

Instantly share code, notes, and snippets.

@j-tim
Created March 29, 2021 19:27
Show Gist options
  • Save j-tim/6770fab8d963f4c1372aba9fa239c291 to your computer and use it in GitHub Desktop.
Save j-tim/6770fab8d963f4c1372aba9fa239c291 to your computer and use it in GitHub Desktop.
Maven settings.xml to use an Azure Artifacts feed as a mirror.
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"
xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<mirrors>
<mirror>
<id>maven-feed</id>
<url>
https://pkgs.dev.azure.com/YourOrganizatioOrNameHere/_packaging/maven-feed/maven/v1
</url>
<mirrorOf>*</mirrorOf>
</mirror>
</mirrors>
<servers>
<server>
<id>maven-feed</id> <!-- Set this to the id of the <repository> element inside your pom.xml file. -->
<username>${env.MVN_USER}</username>
<password>${env.MVN_TOKEN}</password>
</server>
</servers>
</settings>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment