Fork me on GitHub


How do I mark a file as config?

Use the configuration option in the Mapping.


How do I create softlinks as part of the RPM?

Use the softlink source option in the Sources. This will create the soft link in %install and list the link in the %files.


How can I provide multiple rpms (i.e. different architectures) from one project (pom)?

Set the packaging type to pom and use multiple executions of the attached-rpm goal.

In each execution, you need to define a unique classifier.


Can I access the calculated project version and release attributes?

Yes! The version goal will set the calculated version and release to properties. This goal will execute by default as part of the default rpm build lifecycle (for project or packaging type of rpm).


When trying to build an RPM I get an exception saying 'Unable to resolve artifact'!

If you want to include an artifact from the same project that you're building the RPM package in, the RPM execution needs to be built in Maven's build lifecycle. Otherwise Maven can't resolve the project's artifact(s).

The easiest way to do this is to bind the rpm goal to Maven's lifecycle as explained on the Usage page under RPM as Side Effect.


My build takes an unexpectedly long time. How can I speed it up?

One possible cause is that your RPM includes mainly JAR files, and RPM by default tries to compress them, which is both slow and inefficient.

If that is the case, adding the following snippet to the configuration of the plugin will solve your problem by disabling compression.

    <defineStatement>_source_payload w0.gzdio</defineStatement>
    <defineStatement>_binary_payload w0.gzdio</defineStatement>