Select Repositories to Include in a Virtual Repository

JFrog Artifactory Documentation

Products
JFrog Artifactory
Content Type
User Guide
ft:sourceType
Paligo

When creating a virtual repository, you must select the local and remote repositories that will be included. The process is identical for all package types, except for P2 repositories.

To select repositories to include in a virtual repository:

  1. In the Administration module, select Repositories.

  2. Click Create a Repository and select Virtual from the list.

  3. In the Select Package Type window, click the icon for the desired package type. The Basic tab for virtual repositories is displayed.

  4. Select the Available Repositories you want to include in the new virtual repository and move them to the Selected Repositories list.

    Virtual-repo_select-repos.png

    The Included Repositories section displays the effective list of actual repositories included in this virtual repository. If any of the available repositories you have selected are themselves virtual repositories, then the Included Repositories section will display the local and remote repositories included within them. The Included Repository list is automatically updated in case any of the nested virtual repositories change.

    Tip

    This list can be re-ordered by dragging and dropping within the Selected Repositories list. This is important as it sets the resolution order.

    The search/resolution order when requesting artifacts from a virtual repository is always:

    1. Local repositories

    2. Remote repository caches

    3. Remote repositories themselves

    The order within these categories is controlled by the order in which they are presented in the Selected Repositories list.

    When fulfilling a request for the latest version of an artifact from a virtual repository, Artifactory will search all the included repositories to ensure it retrieves the latest version. This means that Artifactory will still search the remote repository even if it finds a version of the artifact in a local or cache repository, to be certain of returning the most current one. If the remote repository is found to have the latest version, Artifactory will download it and update the remote repository cache.

Virtual Repositories and Projects

Like other resources, a virtual repository can be assigned to a specific project and optionally shared with additional projects. If there are selected local and remote repositories that are not assigned to, or shared with, the same project as the virtual repository, the following message appears in the UI:Assign Multiple Projects to ResourcesShare Repositories Across Multiple Projects

virtual-repo_UI-message_project-conflict.png

Click View to see a list of conflicting repositories. Click the export icon to export the list to a CSV file.

virtual-repo_repo-conflicts.png

Administrators need to be aware of possible repository conflicts to avoid a situation where a user with access to the virtual repository cannot access an aggregated repository because they do not have access to that repository's project.

Nesting

Nesting is a unique feature in Artifactory and facilitates more flexibility in using virtual repositories.

Note

Be careful not to create an "infinite loop" of nested repositories. Artifactory analyzes the internal composition of virtual repositories and will issue a warning if the virtual repository cannot be resolved due to invalid nesting.