次の方法で共有


Use packages from Maven Central

TFS 2017

With upstream sources, you can use both private packages you've created and public packages from Maven Central. When you enable upstream sources in your feed, Azure Artifacts will save a copy of any packages you install from Maven central. Azure Artifacts also support other Maven upstream sources such as Google Maven Repository, Gradle Plugins, and JitPack.

Note

Maven snapshots are not supported with Maven upstream sources.

Enable upstream sources

Follow the instructions below to create a new feed and enable upstream sources:

Azure Artifacts is installed by default for TFS 2017 customers. You must upgrade to TFS 2017 in order to use Azure Artifacts. If this is the first time using your feed, you might be asked to assign a license

  1. Go to Build & Release and select Packages.

    Go to Azure Artifacts TFS

  2. Select + New feed.

    New feed button TFS

  3. Give your feed a Name, a Description, and set up who can read, who can contribute and if you want to Include external packages.

    New feed dialog box TFS

  4. Select Create when you are done.

Add Maven Central upstream

  1. Select the gear icon in the top right of the page to access your feed's settings.

  2. Select Upstream sources.

  3. Select Add Upstream.

  4. Select Public source, and then select Maven Central (https://repo.maven.apache.org/maven2/) from the dropdown menu.

    A screenshot showing how to add Maven central upstream source.

  5. Select Save when you are done.

  6. Select Save to save your changes.

    A screenshot showing how to save changes in upstream sources

View saved packages

You can view the packages you saved from upstreams by selecting the Maven Central source from the dropdown menu.

A screenshot showing how to filter for packages from Maven Central.

Tip

If Maven is not downloading all your dependencies, run the following command from the project directory to regenerate your project's files: mvn eclipse:eclipse -DdownloadSources=true -DdownloadJavadocs=true