Set up Maven client in Visual Studio Team Services and TFS

Last Update: 5/16/2017

In order to talk to VSTS feeds, you'll need to put a token on your local machine that Maven can pick up and pass to VSTS.

  1. Navigate to the feed that you'd like to use and select Connect to feed.

    Connect to feed button in the upper-right of the page

  2. Open the Maven tab, click Generate Maven credentials, and copy the generated credentials. (images below)

  3. Maven pulls credentials from your settings.xml file:
    • The settings.xml file's path is "${user.home}/.m2/settings.xml" for Linux and "%USERPROFILE%/.m2/settings.xml" for Windows. If the file doesn't exist, create one now.

  4. Beneath the <settings> and <servers> tags in the file, paste the credentials you copied in Step 3 above.

Sample settings.xml:

            <!--The generated token expires on or before 7/19/2017-->
            <value>Basic Y2Fqb…</value>

NOTE: You can find more info on the settings.xml file in the settings.xml reference.