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:

  1. Login as an Administrator.
  2. Click Repositories in the Left Navigation Menu.
  3. Click the Add.. button above the list of Nexus repositories, and choose Proxy repository from the drop-down of repository types.
  4. In the New Proxy Repository window,

    1. Select OBR as the Provider.
    2. Supply an id and a repository name.
    3. Enter the URL to the remote repository OBR XML as the Remote Storage location.
    4. Click Save.

Figure 14.1, “Creating an OSGi Bundle Proxy Repository” provides some 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 obr.xml 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>
        ...