In my maven project I have to a (fairly large amount) of RPMs. For convenience during deployment I want to assemble all the RPMs into a single archive (.tar.gz). The assembly runs in a separate module which depends on all the RPM modules.
For this I have the following assembly.xml
:
<?xml version="1.0"?>
<assembly>
<id>myproject-rpm-package</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>${project.parent.parent.name}-${project.version}-rpms</baseDirectory>
<dependencySets>
<dependencySet>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<!-- Include only the RPMs -->
<include>*:rpm</include>
</includes>
<outputDirectory>/</outputDirectory>
</dependencySet>
</dependencySets>
</assembly>
This works well, but it renames all my RPMS to follow the format: <projectname>-<version>.rpm
. Losing useful properties in the RPM naming convention: <rpm name>-<version>-<release>.noarch.rpm
. The RPMS still work fine.
My suspicion is that this comes from the maven assembly property outputFileNameMapping.
Is my assumption correct? If so, how can I prevent the renaming of my RPM files by the assembly plugin?