Search code examples
automationjenkins-pipelinenexusoffline-caching

Sync Nexus with local directory


Is there a way to export the entire contents of a Nexus repository to a directory?

I need to be able to pass off all of my artifacts to a different team that is not able to use Nexus.

Even better I would love to be able to keep the directory in sync with Nexus as new artifacts are uploaded.

To be clear, the export directory would be read-only.


Solution

  • Nexus Repository Manager 2 is based on a file system, so there's no need to export anything from it, you already have the files you need. They should be available in your data directory and storage subfolder by repository (e.g. sonatype-work/nexus/storage). Setting up security for it would depend on your OS but in my mind it would be almost as easy to have another NXRM instance for them to access things, because unless they're accessing the base files, you'll need to store them somewhere anyway.

    Nexus Repository Manager 3 is based on a blobstore system so would not be able to do this. There is a Professional/PRO feature export being developed currently (details here). Tangentially, Import for Raw and Maven is available as of 3.23.