Documentation Nexus Repository Manager 2.14

6.3. Managing Repository Groups

Available in Nexus Repository OSS and Nexus Repository Pro

Repository groups are a powerful feature of Nexus Repository Manager. They allow you to combine multiple repositories and other repository groups of the same repository format in a single repository group. This single group and the associated URL can then be used as a single access point to all components in a specific format sourced from an number of repositories.

This eases the configuration for the users and at the same time allows the adminstrators to add more repositories and therefore components without requiring changes on the client computers.

Use the left-hand panel Repositories menu item in the Views/Repositories menu to access the repositories and groups management interface.

To create a new repository group, press the Add button above the repository list and select Repository Group. In the configuration tab provide a Group ID and Group Name. The Group ID will be part of the URL to the repository group and should therefore use a limited set of characters and not contain spaces. Ideally use only lowercase letters and numbers and characters like -.

The selection of the Provider determines the repository Format and therefore the list of Available Repositories automatically. To add repositories to the repository group, drag them to the Ordered Group Repositories or use the arrows between the two lists.

figs/web/repository-manager_add-to-group.png

Figure 6.16. Group Configuration Screen


Note that the order of the repositories listed in Ordered Group Repositories is important. When the repository manager searches for a component in a group, it will return the first match. To reorder a repository in this list, click and the drag the repositories and groups in the Ordered Group Repositories selection list.

The order of repositories or other groups in a group can be used to influence the effective metadata that will be retrieved from a repository group. We recommend placing hosted repositories higher in the list than proxy repositories within the list. For proxy repositories the repository manager needs to periodically check the remote for updates, which will incur more overhead than a hosted repository lookup.

We also recommend placing repositories with a higher probability of matching the majority of components higher in this list. If most of your components are going to be retrieved from the Central Repository, putting Central higher in this list than a smaller, more focused repository is going to be better for performance, as the repository manager is not going to interrogate the smaller remote repository for as many missing components.

Once a repository group is configured it can be used from the client as discussed in e.g. Section 4.2, “Apache Maven”, Section 17.5, “Configuring npm”, Section 18.5, “Using Gem Repositories” or Section 16.6, “Accessing Packages in Repositories and Groups” and further repositories can be added easily.

Nexus Repository Manager ships with one group: public. The Public Repositories group uses the Maven 2 repository format and combines the important external Central Repository with the hosted repositories: 3rd Party, Releases, and Snapshots.

In Section 4.2, “Apache Maven” we configured Maven via the settings.xml to look for components in the public group managed by the repository manager. Figure 6.16, “Group Configuration Screen” shows the group configuration screen in the user interface. In this figure you can see the contents of the Public Repositories group.