Sonatype Nexus proxy for CRAN packages?
Asked Answered
P

3

10

Our organization uses Sonatype Nexus to manage artifacts, whether they're internally-hosted stuff we've developed, or proxies to other repositories like Apache or similar. Most stuff is JAR-based.

My group does most of its work in R, and we're wondering whether it makes sense to 1) deploy our internal code as R packages in Nexus, and 2) create a proxy to a CRAN mirror in Nexus. I guess this would take some glue code, but I'm not very cozy with Nexus, so I'm not really sure what that would look like. Ideally it would let us install R packages by hitting Nexus directly, rather than downloading first & manually installing afterwards.

Anyone have suggestions or precedent?

Pyroelectric answered 6/2, 2013 at 16:45 Comment(3)
Nexus will host any type of file. Problem is the proxy functionality is restricted to a small number of repository formats (Maven, NuGet, etc). Do you know the format of the CRAN repository? (I'm not familiar with it)Bernardinabernardine
It seems to be its own custom "format". Its artifacts are *.tar.gz or *.zip files, there's a directory structure, and an index file saying what's available in the repository.Pyroelectric
Yes, most repositories would have these features. Problem is compatibility...Bernardinabernardine
G
5

Since NXRM 3.20.0 support for CRAN is offered in the default install thanks to Sonatype adopting the below mentioned community plugin.

For older NXRM release the Nexus Community has a plugin that adds support for CRAN repositories. You can find it on GitHub to install yourself.

Guardafui answered 9/3, 2018 at 7:52 Comment(1)
Yes - we started using that plugin about a year ago and it's working quite well for us.Pyroelectric
T
1

Nexus now natively supports R packages as of version 3.20

Check out the release notes: https://help.sonatype.com/repomanager3/formats/r-repositories#RRepositories-RRepositoryGroups

I was able to create R repo's with the same automation.

Tamishatamma answered 10/2, 2020 at 19:18 Comment(0)
C
0

How about placing your internal zipped package on an (internal only, if you like) URL that you can then point the devtools::install_url function to?

Cassey answered 6/2, 2013 at 20:10 Comment(1)
That works, it's basically what we do now (with the addition of running the write_PACKAGES() function to make the directory a valid CRAN-like site), but it doesn't help the development group have all their dependencies in Nexus. Using Nexus/Maven does have advantages, like describing all dependencies explicitly in one place, no matter what type of artifacts they are.Pyroelectric

© 2022 - 2024 — McMap. All rights reserved.