Skip to content
This repository has been archived by the owner on Sep 18, 2020. It is now read-only.

R, v data science, much functional programming, doge

License

Notifications You must be signed in to change notification settings

sonatype-nexus-community/nexus-repository-r

Nexus Repository R Format

CircleCI Join the chat at https://gitter.im/sonatype/nexus-developers DepShield Badge Maven Central

Huzzah! R is now part of Nexus Repository Manager. Version 3.20 includes the R plugin by default. The plugin source code is now in nexus-public in nexus-repository-r.

Filing issues: Upgrade to the latest version of Nexus Repository Manager 3, to get the latest fixes and improvements, before filing any issues or feature requests at https://issues.sonatype.org/.

Upgrading: If you are using a version prior to 3.20 and upgrade to a newer version you will not be able to install the community plugin. No other changes are required, and your existing data will remain intact.

Table Of Contents

Developing

Contribution Guidelines

Go read our contribution guidelines to get a bit more familiar with how we would like things to flow.

Requirements

Also, there is a good amount of information available at Bundle Development

Building

To build the project and generate the bundle use Maven

mvn clean install

If everything checks out, the bundle for R should be available in the target folder

Build with Docker

docker build -t nexus-repository-r .

Run as a Docker container

docker run -d -p 8081:8081 --name nexus-repository-r nexus-repository-r  

For further information like how to persist volumes check out the GitHub repo for our official image.

After allowing some time to spin up, the application will be available from your browser at http://localhost:8081.

To read the generated admin password for your first login to the web UI, you can use the command below against the running docker container:

docker exec -it nexus-repository-r cat /nexus-data/admin.password && echo

For simplicity, you should check Enable anonymous access in the prompts following your first login.

Using R With Nexus Repository Manager 3

Please view detailed instructions on how to get started here!

Compatibility with Nexus Repository Manager 3 Versions

The table below outlines what version of Nexus Repository the plugin was built against:

Plugin Version Nexus Repository Version
v1.0.0 <3.8.0-02
v1.0.1 >=3.8.0-02
v1.0.2 >=3.14.0-04
v1.0.3 >=3.15.2-01
v1.0.4 >=3.18.0-01
v1.1.1 In product >=3.20.0+
All released versions can be found here.

Installing the plugin

In Nexus Repository Manager 3.20+ R format is already included. So there is no need to install it. But if you want to reinstall the plugin with your improvements then following instructions will be useful.
Note: Using an unofficial version of the plugin is not supported by the Sonatype Support team.

Permanent Reinstall

  • Copy the new bundle into <nexus_dir>/system/org/sonatype/nexus/plugins/nexus-repository-r/1.1.1-SNAPSHOT/nexus-repository-r-1.1.1-SNAPSHOT.jar

  • Edit <nexus_dir>/system/org/sonatype/nexus/assemblies/nexus-cma-feature/3.x.y/nexus-cma-feature-3.x.y-features.xml changing R to your snapshot version (examples, the actual lines surrounding may vary):

          <feature version="1.a.b">nexus-repository-p2</feature>
          <feature version="1.1.1.SNAPSHOT">nexus-repository-r</feature>
          <feature version="3.x.y.xy">nexus-repository-raw</feature>
    

    And

    + <feature name="nexus-repository-r" description="nexus-repository-r" version="1.1.1.SNAPSHOT">
    ...
    +     <bundle>mvn:org.sonatype.nexus.plugins/nexus-repository-r/1.1.1-SNAPSHOT</bundle>
    + </feature>
    

This will cause the plugin to be loaded and started with each startup of Nexus Repository.

NOTE: The file location changed in version 3.21. For older versions, edit these files:

  • If you are using OSS edition, make these mods in: <nexus_dir>/system/com/sonatype/nexus/assemblies/nexus-oss-feature/3.x.y/nexus-oss-feature-3.x.y-features.xml
  • If you are using PRO edition, make these mods in: <nexus_dir>/system/com/sonatype/nexus/assemblies/nexus-pro-feature/3.x.y/nexus-pro-feature-3.x.y-features.xml Additionally, prior to 3.21 the lines did not exist so they'd need to be added instead of edited.

Easiest Install for version

Nexus Repository Manager 3.20+ already includes the R plugin. If you want to install an old R plugin in an old Nexus Repository Manager, the instructions below may be useful. However, we strongly recommend you update to the latest Nexus Repository version. If you are developing new features for R plugin and want to install your new R plugin, then follow the instructions below.

Thanks to some upstream work in Nexus Repository (versions newer than 3.15), it's become a LOT easier to install a plugin. To install the R plugin, you can either build locally or download from The Central Repository:

Option 1: Build a *.jar file locally from the GitHub Repo

  • Clone this repo and cd to the cloned directory location
  • Build the plugin with mvn clean package
  • There should now be a nexus-repository-r-1.1.0.jar file your <cloned_repo>/target directory

Option 2: Download a *.jar file from The Central Repository

Once you've completed Option 1 or 2, copy the nexus-repository-r-1.1.0.jar file into the <nexus_dir>/deploy folder for your Nexus Repository installation.

Restart Nexus Repo, or go ahead and start it if it wasn't running to begin with.

You should see the R repository types (e.g. r (proxy)) in the available Repository Recipes to use if everything goes according to the plan.

The Fine Print

Starting from version 3.20+ the R plugin is supported by Sonatype, but still is a contribution of ours to the open source community (read: you!)

Phew, that was easier than I thought. Last but not least of all:

Have fun creating and using this plugin and the Nexus platform, we are glad to have you here!

Getting help

Looking to contribute to our code but need some help? There's a few ways to get information: