Thursday, January 18, 2018

R support in Sonatype Nexus 3.7

What is R ? but even better

What is CRAN ? and

"A core set of packages is included with the installation of R, with more than 11,000 additional packages (as of July 2017) available at the Comprehensive R Archive Network (CRAN), Bioconductor, Omegahat, GitHub, and other repositories."

git clone
cd nexus-repository-r/
git tag -l
git checkout tags/1.0.1
(you are now in detached head, who cares...)
or even better : git checkout tags/1.0.1 -b 1.0.1 (so you don't get a detached head)
WARNING: for Nexus version 3.8.0-02 and above use tag 1.0.1, otherwise 1.0.0
mvn clean install

ls target/nexus-repository-r-1.0.0.jar

docker run -d -p 8081:8081 --name nexus sonatype/nexus3
docker cp nexus-repository-r-1.0.0.jar 6f49bdc956a6:/opt/sonatype/nexus/system/org/sonatype/nexus/plugins/

docker exec -u 0 -ti 6f49bdc956a6 /bin/bash
stty rows 50 cols 132
cd /opt/sonatype/nexus/system/org/sonatype/nexus/plugins/
mkdir -p nexus-repository-r/1.0.0/
mv nexus-repository-r-1.0.0.jar nexus-repository-r/1.0.0/

vi /opt/sonatype/nexus/system/com/sonatype/nexus/assemblies/nexus-oss-feature/3.7.1-02/nexus-oss-feature-3.7.1-02-features.xml

customize the file as per chapter "(most) Permanent Install" (careful! you must add 2 separate sections in the XML file! Nexus stinks, they should provide a CLI to manage plugins, instead of asking you to manually manipulate the XML )

docker stop 6f49bdc956a6
docker start 6f49bdc956a6

when you create a new repository, you should now see the r (group) r (hosted) and r (proxy) types

No comments: