General
Use the configuration option in the Mapping.
Use the softlink source option in the Sources. This will create the soft link in %install and list the link in the %files.
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.
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).
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.
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.
<defineStatements> <defineStatement>_source_payload w0.gzdio</defineStatement> <defineStatement>_binary_payload w0.gzdio</defineStatement> </defineStatements>