Repository Management with Nexus

14.2. Proxy OSGi Bundle Repositories

Nexus can proxy an OSGi Bundle Repository using the OBR repository XML as the remote storage location. To create a new proxy OBR repository access the Repositories view from the Views/Repositories submenu and click the Add.. button above the list of repositories and choose Proxy Repository from the drop-down of repository types.

In the New Proxy Repository configuration tab, supply a Repository ID and a Repository Name and select OBR as the Provider.

Then enter the URL to the remote repository OBR XML as the Remote Storage Location and click Save.

Figure 14.1, “Creating an OSGi Bundle Proxy Repository” provides a sample configuration used to create a proxy of the Apache Felix OBR repository.

figs/web/obr_create_proxy.png

Figure 14.1. Creating an OSGi Bundle Proxy Repository


To verify that the OBR proxy repository has been properly configured, you can then load the OBR XML from Nexus Professional. If Nexus Professional is properly configured, you will be able load the obr.xml by navigating to the .meta directory:

$curl http://localhost:8081/nexus/content/repositories/felix-proxy/.meta/obr.xml
<?xml version='1.0' encoding='utf-8'?>
<?xml-stylesheet type='text/xsl' href='http://www2.osgi.org/www/obr2html.xsl'?>
<repository name='Felix OBR Repository' lastmodified='1247493075615'>
    <resource id='org.apache.felix.javax.servlet/1.0.0'
              presentationname='Servlet 2.1 API'
              symbolicname='org.apache.felix.javax.servlet'
    uri='../bundles/org.apache.felix.javax.servlet-1.0.0.jar'
              version='1.0.0'>
        <description>
            Servlet 2.1 API
        </description>
        <documentation>
            http://www.apache.org/
        </documentation>
        <license>
            http://www.apache.org/licenses/LICENSE-2.0.txt
        </license>
        ...