4.4. Adding a New Repository

To add a repository, log in as an administrator, and click on the Repositories link in the left-hand navigation menu in the Views/Repositories section as displayed in Figure 4.1, “Creating a New Proxy Repository”.

Clicking on this link should bring up a window that lists all the configured repositories. You’ll then want to create a new proxy repository. To do this, click on the Add link that is directly above the list of repositories. When you click the Add button, click the down arrow directly to the right of the word Add, this will show a drop-down which has the options: Hosted Repository, Proxy Repository, Virtual Repository, and Repository Group. Since you are creating a proxy repository, click on Proxy Repository.


Figure 4.1. Creating a New Proxy Repository

Once you do this, you will see a screen resembling Figure 4.2, “Configuring a Proxy Repository”. Populate the required fields Repository ID and the Repository Name. The Repository ID will be part of the URL used to access the repository, so it is recommended to avoid characters that could cause problems there or on the filesystem storage. It is best to stick with lowercase alphanumerics. Set the Repository Policy to Release, and the Remote Storage Location to the public URL of the repository you want to proxy.


Figure 4.2. Configuring a Proxy Repository

Once you’ve filled out this screen, click on the Save button. The repository manager is now configured to proxy the repository. If the remote repository contains snapshots as well as release components, you will need to repeat the process creating a second proxy repository and setting the policy to Snapshots.

Want to also proxy .NET gallery?

Use Nexus Pro to manage both Java and .NET.

Try Nexus Pro for Free