Install Maven packages in Visual Studio Team Services and TFS

Last Update: 5/16/2017

Install Maven packages from your feed using the Maven client.

The most common way to install a Maven package is as a dependency of another package.

  1. Create a Maven package using the following command:

    mvn -B archetype:generate -DarchetypeGroupId="org.apache.maven.archetypes" -DgroupId="MyGroup" -DartifactId="mySecondApp"
    
  2. From the connect to feed dialog in Team Services, copy the <repository> information. Paste it into your pom.xml twice: (See example below)

    • Between the <repositories> tags.
    • Between the <distributionManagement> tags.
  3. In Team Services, go to the package you want to install, and copy the <dependency> XML.
  4. Paste the <dependency> information inside the <dependencies> tag of your POM.xml.
  5. Run mvn install from the directory containing your POM.xml.

See the Maven CLI docs for more install options.