Fork me on GitHub

Usage Scenarios

Listed below are the various scenarios where the RPM plugin can be used along with the proper way to configure the project(s) involved.

RPM on Demand

In this scenario, an RPM is generated from the project on demand by executing the goal "rpm:rpm" within a project. The project itself may be configured to produce any sort of packaging, since the RPM is not the primary artifact produced by the project.

If you want the project's artifacts packaged in the RPM, you must generate the RPM as a side effect of the standard lifecycle.

Things which do not work as I envision the 1.0 release working:

  • If this goal is run on a project with modules, it will run the "rpm:rpm" goal on each module, rather than packaging the modules into a single RPM.

RPM as Side Effect

In this scenario, an RPM is generated from the project whenever the project is packaged. This must be done whenever the project's primary artifact is intended to be part of the RPM package but can be done anytime. To set up this configuration, include the following lines in the plugin definition in the project's POM file (see the sample configuration for an example of this):


RPM as Secondary Artifact

In this scenario, the rpm is not the primary artifact, but will be deployed as a secondary artifact.


RPM as Primary Artifact

In this scenario, the RPM is the primary artifact of the project and is created by executing the phase "package" within the project. If properly configured, this allows the user to execute "mvn package" on a top-level project (which has the items to build and the RPM project as modules) and have Maven package the items to build into jars, wars, ears, etc. and them assemble the RPM of those items for distribution.

The packaging value should be set to "rpm".

<project xmlns="" xmlns:xsi=""
    xsi:schemaLocation=" ">

The extensions tag for this plugin should be marked true.


Configure GPG passphrase under settings.xml

GPG passphrase can be configured under local settings.xml either in clear or encrypted text.

      <passphrase>clear or encrypted text</passphrase>