Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

Nexus Yum Plugin

A plugin for Sonatype Nexus 1.9.2.x or 2.X which recognizes RPMs in Nexus Maven repositories and generates Yum metadata, so that RedHat-compatible system can use Nexus as software repository.


The Nexus Yum Plugin is for all guys, who are deploying Java application for RedHat-compatible (RHEL, Centos, Fedora) servers and deploy via RPM.

Default use case

CLD at IS24


Sonatype Nexus is a common repository manager for Maven, used by many companies to manage their Java artifacts like JAR, WAR, pom.xml files. At ImmobilienScout24 the DevOps-guys started to deploy their configurations and java applications via RPMs and wanted to have a repository manager for their application RPMs. Why don't extend Sonatype Nexus to host RPMs as well?


  • Use a Maven repository, hosted in Nexus, containing RPMs as if it is a Yum repository. This leverages the virtual repository mechanism in Nexus which allows you to use Maven tooling to deploy RPMs into a Maven repository but still allow Yum clients to interact with the repository using the protocol it understands.
  • Yum repositories are automatically updated if you upload/deploy/delete a new RPM into Nexus.
  • Full group support so that you can logically group a set of Yum repositories behind a single URL.
  • Have versioned views on repositories:
    gives you a Yum repository with all packages in version 1.2.3 in repository releases.
  • You can define aliases for specific versions eg. production=1.2 and testing=2.0 and access them via the alias:
    to get constant repository URLs for your servers. A new release is then applied to the server via setting the alias to a new version.
  • Create Yum createrepo tasks manually via web interface.
  • Multiple createrepo tasks on the same repository get merged.
  • Use Yum group repositories as target of staging repositories (Nexus Pro)

Help & Issues

Ask for help at our Google Group or create a new issue.


  1. Install Sonatype Nexus
  2. Download latest from our downloads page
  3. Unzip the bundle to $NEXUS_WORK_DIR/plugin-repository/. The default for $NEXUS_WORK_DIR is ~/sonatype-work/nexus/. For example: unzip nexus-yum-plugin-1.13-bundle-zip -d $NEXUS_WORK_DIR/plugin-repository/
  4. Install createrepo using your update manager (yum, apt-get, etc.) eg. sudo yum install createrepo
  5. Make sure that in Nexus Adminstration --> Settings --> Application Server Settings (optional) --> Base URL is set to a vaild URL like :
  6. Sometimes Force Base URL is nessessary, too, see ISSUE 4 . Otherwise the plugin can't determine the server URL and you got RPM locations like null/content/repositories/... in primary.xml.
  7. Configure Nexus Yum Plugin via yum.xml. See Configuration.
  8. Restart Nexus. Eg. sudo service nexus stop sudo service nexus start

Now the plugin should be installed.


Here, you'll find everything about configuring Nexus Yum Plugin.


The configuration of the Nexus Yum Plugin can be found in yum.xml in the same directory as nexus.xml : $NEXUS_WORK_DIR/conf/yum.xml Default: ~/sonatype-work/nexus/conf/yum.xml


Example yum.xml:

<?xml version="1.0" encoding="UTF-8"?>
  <!-- timeout for requests for a filtered (versionized) repository -->
  <repositoryCreationTimeout>150</repositoryCreationTimeout><!-- in seconds -->

  <!-- enables or disables the creation of a repository of repositories -->

  <!-- enables or disables of delete rpm events via nexus -->

  <!-- delay after which the rebuild of a repository is triggered in which one or more rpms got deleted -->
  <delayAfterDeletion>10</delayAfterDeletion><!-- in seconds -->

  <!-- configured aliases -->

How to build

The build process is based on Apache Maven 3. You must have createrepo installed in order to execute all the integration tests. Just do a

mvn package 

to run all tests and create a plugin bundle.

Something went wrong with that request. Please try again.