Get started with Maven Package Management in Team Services and TFS

Last Update: 4/25/2017

Before you start

This guide assumes you've already set up Package Management. You can check out how to install and license the extension in the Install and license Package Management guide, or go directly to the Extensions Marketplace listing to install.

Create a feed

Already have a feed? Skip to the next step.

A feed is a container for packages. You consume and publish packages through a particular feed.

To get started, navigate to the Package hub in the Build & Release hub group:

Go to Package hub

If you don't see the Package hub, then ask your account owner to install the Package Management extension from the Visual Studio Marketplace.

Click the dropdown in the top left and select New feed:

New feed button

In the dialog:

  • Give the feed a name and a description (optional).
  • Choose who can read and contribute (or update) packages in your feed. The default selections give Team Build access so that continuous integration builds can add and update packages.
  • When you're done, choose Create.

New feed dialog

You can change these settings later by editing the feed.

Setup your POM and settings .xml


Publish a package

Publish Maven packages to a feed in Package Management to share them with your team and your organization.

  1. Set up the Maven client with your feed.
  2. Open a shell and navigate to the directory that contains your package's POM.xml. If you don't have a POM.xml, run mvn archetype:generate (see the Maven CLI docs).
  3. Push your package by running mvn deploy inside the directory containing your POM.xml.

See the Maven CLI docs for more publish options.

Consume your package in Visual Studio

Install Maven packages from your feed using the Maven client.

  1. Set up the Maven client with your feed.
  2. Open a shell and navigate to the directory that contains your project's POM.xml.
  3. Install a package by running mvn install.

See the Maven CLI docs for more install options.

Automate the process with continuous integration

You can use continuous integration systems like Team Build to automate the packing and publishing of your packages. To get started with continuous integration, see the Continuous delivery overview

What's next?

For more advanced topics, check out the content summary.