Meet the Nexus Remote Repository Browsing Plugin


January 26, 2010 By Anders Hammar

Having used Nexus since it was a beta release and having also written a Plexus component-style Nexus plugin (the nexus-ldap realm), I was curious about the new Nexus Plugin API introduced in Nexus 1.4.0. To try it out, I asked two of our developers here at Devoteam Sweden to develop the Nexus Remote Repository Browsing Plugin – a Nexus plugin that makes it possible to directly browse the remote Maven repository of a proxy repository within the Nexus UI. The plugin has been contributed to Nexus OSS and will be released as a part of the upcoming 1.5.0 release.  In this blog post, I will talk a little bit about the plugin and its use case.

In the Repository panel of Nexus, there are two tabs for browsing artifacts. The first one is called “Browse Storage” and is used to browse all artifacts stored/cached locally by the Nexus instance. For a hosted repository, the tree displayed under “Browse Storage” will contain all available artifacts. For a proxy repository, you will only find those artifacts that have been cached due to earlier requests. The second tab, “Browse Index”, allows you to browse artifacts through the repository’s index.  If the remote repository provides an up-to-date index and you have configured Nexus to download this remote index, all of the artifacts in the remote repository will be visible under the “Browse Index” tab.   While the “Browse Index” tab works for all of the major public Maven repositories, it doesn’t allow you to browse remote repositories which do not publish a Nexus index.

This is where the Nexus Remote Repository Browsing Plugin (nexus-rrb-plugin) comes into play. The plugin adds a third browsing tab for proxy repositories, the “Browse Remote” tab. In this tab, it is possible to browse the actual remote repository from within the Nexus UI. Below you find a screen shot of the new tab.

Before this plugin, the user was forced to browse the remote repository in a separate browser window. Not only is this inconvenient, but for many users it is not possible as the URL of the remote repository is normally only visible to administrators. Also, the connection to the remote repository will be initiated from the Nexus instance. The benefit of this is that it will work even if your network setup prevents direct access from the clients to the remote repository.

This first version of the plugin doesn’t add any bells and whistles to the browsing. The tab is added to all proxy repositories and is available to all users. However, it does support browsing of Maven repositories at S3, such as the SpringSource repository.  This ability to browse a repository hosted on S3 is significant as it is tricky to do this via a normal web browser.

As mentioned above, the nexus-rrb-plugin is included as a core plugin in the upcoming Nexus 1.5.0 release.   This means that it will be available as a part of the core Nexus OSS offering.   Once Nexus 1.5.0 is released, please try it out and use the issue tracker for reporting any problems you run into and enhancements you would like to see – we’re especially interested in hearing about repositories that the plugin cannot handle! Questions and discussions may be posted to the Nexus mailing list.