rpm:rpm
Full name:
org.codehaus.mojo:rpm-maven-plugin:2.5.0:rpm
Description:
Construct the RPM file.
Attributes:
- Requires a Maven project to be executed.
- Requires dependency resolution of artifacts in scope:
runtime. - The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase:
package.
Required Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<name> |
String |
- |
The name portion of the output file name. Default: ${project.artifactId}User Property: rpm.name |
<projversion> |
String |
- |
The version portion of the RPM file name. Default: ${project.version}User Property: rpm.versionAlias: version |
<releaseProperty> |
String |
2.1-alpha-2 |
The system property to read the calculated release from, normally set by the version mojo. Default: rpm.release |
<versionProperty> |
String |
2.1-alpha-2 |
The system property to read the calculated version from, normally set by the version mojo. Default: rpm.version |
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<addDependencyBasedRequires> |
boolean |
2.5.0 |
Indicates if a Requires entry is generated for each direct dependency of the project that has the type rpm. The entry has the form name >= version-release, with the three values read from the dependency's rpm file, and is added to the entries of requires. Transitive dependencies are not considered.Default: falseUser Property: rpm.addDependencyBasedRequires |
<attachSpec> |
boolean |
2.5.0 |
Indicates if the generated spec file should be attached to the project as a secondary artifact with type spec and classifier rpm-spec, so that install and deploy publish it next to the rpm.
NOTE: Maven allows one attached artifact per type and classifier, so enable this in a single execution of a project. Default: falseUser Property: rpm.attachSpec |
<autoProvides> |
boolean |
2.0-beta-4 |
Automatically add provided shared libraries. Default: true |
<autoRequires> |
boolean |
2.0-beta-4 |
Automatically add requirements deduced from included shared libraries. Default: true |
<buildRequires> |
LinkedHashSet<String> |
2.1.6 |
The list of build requirements for this package. |
<changelogFile> |
File |
2.0-beta-3 |
The changelog file. If the file does not exist, it is ignored. |
<cleanScriptlet> |
Scriptlet |
2.0-beta-4 |
The clean scriptlet. |
<conflicts> |
LinkedHashSet<String> |
- |
The list of conflicts for this package. |
<copyTo> |
File |
2.1. |
Option to copy the created RPM to another location User Property: rpm.copyTo |
<defaultDirmode> |
String |
2.0-beta-2 |
The default directory mode (octal string) to assign to directories when installed.
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated. |
<defaultFilemode> |
String |
2.0-beta-2 |
The default file mode (octal string) to assign to files when installed.
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated. |
<defaultGroupname> |
String |
2.0-beta-2 |
The default group name for files when installed.
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated. |
<defaultUsername> |
String |
2.0-beta-2 |
The default user name for files when installed.
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated. |
<defineStatements> |
List<String> |
- |
A list of %define arguments |
<description> |
String |
- |
The long description of the package. Default: ${project.description}User Property: rpm.description |
<disabled> |
boolean |
2.0 |
Indicates if the execution should be disabled. If true, nothing will occur during execution.Default: falseUser Property: rpm.disabled |
<distribution> |
String |
- |
The distribution containing this package. |
<enhances> |
LinkedHashSet<String> |
2.5.0 |
The list of enhances for this package, written as Enhances tags after the conflicts. Older versions of rpm ignore these tags. |
<epoch> |
String |
- |
The epoch of this package. As defined here: http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-tags.html |
<escapeString> |
String |
2.0 |
Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo} User Property: maven.rpm.escapeString |
<filters> |
List<String> |
2.0 |
Filters (property files) to include during the interpolation of the pom.xml. |
<group> |
String |
- |
The package group for the package. Optional: the Group tag is optional since RPM 4.6 and deprecated in some distributions, such as Fedora. Without a value no Group line is written. |
<hardLinkDependencies> |
boolean |
TODO |
Indicates if the dependencies should be hard linked instead of copied.
NOTE: Hard link requires maven repository to be on same partition as project's build dir. Default: false |
<icon> |
File |
- |
An icon for the package. |
<installScriptlet> |
Scriptlet |
2.0-beta-4 |
The installation scriptlet. |
<keyExpectTimeout> |
int |
2.5.0 |
The number of seconds expect waits for each prompt while signing the rpm with a keyPassphrase. The default -1 means no timeout.Default: -1 |
<keyPassphrase> |
Passphrase |
2.0-beta-4 |
The passphrase for the keyname to sign the rpm. This utilizes expect and requires that expect be on the PATH.
Note that the data type used is NOT <configuration>
...
<keyPassphrase>
<passphrase>password</passphrase>
</keyPassphrase>
</configuration>
If not given, look up the value under Maven settings using server id at 'keyPassphraseServerId' configuration. |
<keyname> |
String |
- |
Set to a key name to sign the package using GPG. If keyPassphrase is not also provided, this will require the input of the passphrase at the terminal. User Property: gpg.keyname |
<keypath> |
File |
2.1.2 |
The directory from which gpg will load keyrings. If not specified, gpg will use the value configured for its installation, e.g. ~/.gnupg or %APPDATA%/gnupg.User Property: gpg.homedir |
<license> |
String |
2.1-alpha-4 |
The one-line license information. |
<mappings> |
List<Mapping> |
- |
The list of file mappings. |
<needarch> |
String |
- |
The target architecture for the rpm. The default value is noarch.
For passivity purposes, a value of This can also be used in conjunction with Source targetArchitecture to flex the contents of the rpm based on the architecture. |
<numericModifierAsRelease> |
boolean |
2.5.0 |
Indicates if an all-numeric modifier of the version, such as the 1 in 1.0.0-1, is used as the release instead of having _1 appended to it. With true, version 1.0.0-1 gives version 1.0.0 and release 1; the default gives release 1_1. Only applies if release is not set.Default: falseUser Property: rpm.numericModifierAsRelease |
<obsoletes> |
LinkedHashSet<String> |
2.0-beta-3 |
The list of obsoletes for this package. |
<packager> |
String |
- |
The name of the person or group creating the package. Default: ${project.organization.name}User Property: rpm.packager |
<passphraseServerId> |
String |
- |
Server id to lookup the gpg passphrase under Maven settings. The default value intentionally selected to match with maven-gpg-plugin. Default: gpg.passphraseUser Property: gpg.passphraseServerId |
<postinstallScriptlet> |
Scriptlet |
2.0-beta-4 |
The post install scriptlet. |
<postremoveScriptlet> |
Scriptlet |
2.0-beta-4 |
The post-removal scriptlet. |
<posttransScriptlet> |
Scriptlet |
2.0-beta-4 |
The posttrans script. |
<preambleLines> |
List<String> |
2.5.0 |
Free-form lines that are written verbatim to the preamble of the spec file, after the tags the plugin generates and before %description. Use them for tags and macros that have no parameter of their own, such as %{?systemd_requires}. The plugin does not check the lines. The default is no lines. |
<prefix> |
String |
- |
The relocation prefix for this package. |
<prefixes> |
List<String> |
2.1-alpha-4 |
Additional relocation prefixes if needed. |
<preinstallScriptlet> |
Scriptlet |
2.0-beta-4 |
The pre-installation scriptlet. |
<prepareScriptlet> |
Scriptlet |
2.0-beta-4 |
The prepare scriptlet; |
<preremoveScriptlet> |
Scriptlet |
2.0-beta-4 |
The pre-removal scriptlet. |
<prereqs> |
LinkedHashSet<String> |
2.0-beta-3 |
The list of prerequisites for this package. |
<pretransScriptlet> |
Scriptlet |
2.0-beta-4 |
The pretrans scriptlet. |
<provides> |
LinkedHashSet<String> |
- |
The list of virtual packages provided by this package. |
<recommends> |
LinkedHashSet<String> |
2.5.0 |
The list of recommends for this package, written as Recommends tags after the conflicts. Older versions of rpm ignore these tags. |
<release> |
String |
- |
The release portion of the RPM file name.
Beginning with 2.0-beta-2, this is an optional parameter. By default, the release will be generated from the modifier portion of the project version using the following rules:
User Property: rpm.release |
<repackJars> |
boolean |
2.1-alpha-4 |
Should brp-repack-jars be used in the RPM build. Defaults to false. If it is false brp-repack-jars will be disabled by:
%define __jar_repack 0 This will have no effect on RHEL5 or earlier release. |
<requires> |
LinkedHashSet<String> |
- |
The list of requirements for this package. |
<requiresPost> |
LinkedHashSet<String> |
2.1.6 |
The list of requirements for running the post install scriptlet. |
<requiresPre> |
LinkedHashSet<String> |
2.1.6 |
The list of requirements for running the pre-installation scriptlet. |
<requiresPreun> |
LinkedHashSet<String> |
2.1.6 |
The list of requirements for running the pre-removal scriptlet. |
<rpmbuildArgs> |
List<String> |
2.5.0 |
Additional arguments for rpmbuild, in the order given and placed just before the spec file name. Use them for options the plugin has no parameter for, such as --rcfile, whose value is a separate argument. The plugin does not check them. The default is no arguments.User Property: rpm.rpmbuildArgs |
<rpmbuildStage> |
String |
- |
The stage to build. Default to '-bb' but let users specify for instance '-ba' if they want source rpms as well. Default: -bbUser Property: rpm.rpmbuild.stageAlias: rpmbuildStage |
<signHashAlgorithm> |
String |
2.5.0 |
The digest algorithm GPG uses to sign the rpm, for example SHA512. It defines the %_gpg_digest_algo macro. If not given, the GPG default applies.User Property: gpg.signHashAlgorithm |
<skipPOMs> |
boolean |
2.1.6 |
Indicates if the execution should be disabled for POM projects. If true, nothing will happen during execution in projects with packaging "pom".Default: false |
<suggests> |
LinkedHashSet<String> |
2.5.0 |
The list of suggests for this package, written as Suggests tags after the conflicts. Older versions of rpm ignore these tags. |
<summary> |
String |
- |
The one-line description of the package. Default: ${project.name}User Property: rpm.summary |
<supplements> |
LinkedHashSet<String> |
2.5.0 |
The list of supplements for this package, written as Supplements tags after the conflicts. Older versions of rpm ignore these tags. |
<targetOS> |
String |
2.0-beta-3 |
The target os for building the RPM. By default, this will be populated to Os.OS_NAME.
This can be used in conjunction with Source targetOSName to flex the contents of the rpm based on operating system. |
<targetVendor> |
String |
2.0-beta-3 |
The target vendor for building the RPM. By default, this will be populated to the result of rpm -E %{_host_vendor}. |
<triggers> |
List<BaseTrigger> |
2.0-beta-4 |
The list of triggers to take place on installation of other packages.
<triggers>
<installTrigger>
<subpackage>optional</subpackage>
<program>program to execute (if not shell) optional</program>
<script>actual contents of script - optional</script>
<scriptFile>location of file containing script, or classpath:resource - optional</script>
<fileEncoding>character encoding for script file - recommended</fileEncoding>
<triggers>
<trigger>package/version to trigger on (i.e. jre > 1.5)</trigger>
...
</triggers>
</installTrigger>
<removeTrigger>
...
</removeTrigger>
<postRemoveTrigger>
...
</postRemoveTrigger>
...
</triggers>
See also: BaseTrigger |
<url> |
String |
- |
A URL for the vendor. Default: ${project.organization.url}User Property: rpm.url |
<vendor> |
String |
- |
The vendor supplying the package. Default: ${project.organization.name}User Property: rpm.vendor |
<verifyScriptlet> |
Scriptlet |
2.0-beta-4 |
The verify scriptlet. |
<workarea> |
File |
- |
The area for RPM to use for building the package.
NOTE: The absolute path to the workarea MUST NOT have a space in any of the directory names. Beginning with release 2.0-beta-3, sub-directories will be created within the workarea for each execution of the plugin within a life cycle. Default: ${project.build.directory}/rpm |
Parameter Details
<addDependencyBasedRequires>
Requires entry is generated for each direct dependency of the project that has the type rpm. The entry has the form name >= version-release, with the three values read from the dependency's rpm file, and is added to the entries of requires. Transitive dependencies are not considered.- Type:
boolean - Since:
2.5.0 - Required:
No - User Property:
rpm.addDependencyBasedRequires - Default:
false
<attachSpec>
spec and classifier rpm-spec, so that install and deploy publish it next to the rpm.
NOTE: Maven allows one attached artifact per type and classifier, so enable this in a single execution of a project.
- Type:
boolean - Since:
2.5.0 - Required:
No - User Property:
rpm.attachSpec - Default:
false
<autoProvides>
- Type:
boolean - Since:
2.0-beta-4 - Required:
No - Default:
true
<autoRequires>
- Type:
boolean - Since:
2.0-beta-4 - Required:
No - Default:
true
<buildRequires>
- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.1.6 - Required:
No
<changelogFile>
- Type:
java.io.File - Since:
2.0-beta-3 - Required:
No
<cleanScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<conflicts>
- Type:
java.util.LinkedHashSet<java.lang.String> - Required:
No
<copyTo>
- Type:
java.io.File - Since:
2.1. - Required:
No - User Property:
rpm.copyTo
<defaultDirmode>
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated.
- Type:
java.lang.String - Since:
2.0-beta-2 - Required:
No
<defaultFilemode>
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated.
- Type:
java.lang.String - Since:
2.0-beta-2 - Required:
No
<defaultGroupname>
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated.
- Type:
java.lang.String - Since:
2.0-beta-2 - Required:
No
<defaultUsername>
Only applicable to a Mapping if filemode, username, AND groupname are NOT populated.
- Type:
java.lang.String - Since:
2.0-beta-2 - Required:
No
<defineStatements>
%define arguments- Type:
java.util.List<java.lang.String> - Required:
No
<description>
- Type:
java.lang.String - Required:
No - User Property:
rpm.description - Default:
${project.description}
<disabled>
true, nothing will occur during execution.- Type:
boolean - Since:
2.0 - Required:
No - User Property:
rpm.disabled - Default:
false
<distribution>
- Type:
java.lang.String - Required:
No
<enhances>
Enhances tags after the conflicts. Older versions of rpm ignore these tags.- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.5.0 - Required:
No
<epoch>
- Type:
java.lang.String - Required:
No
<escapeString>
- Type:
java.lang.String - Since:
2.0 - Required:
No - User Property:
maven.rpm.escapeString
<filters>
- Type:
java.util.List<java.lang.String> - Since:
2.0 - Required:
No
<group>
Group tag is optional since RPM 4.6 and deprecated in some distributions, such as Fedora. Without a value no Group line is written.- Type:
java.lang.String - Required:
No
<hardLinkDependencies>
NOTE: Hard link requires maven repository to be on same partition as project's build dir.
- Type:
boolean - Since:
TODO - Required:
No - Default:
false
<icon>
- Type:
java.io.File - Required:
No
<installScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<keyExpectTimeout>
-1 means no timeout.- Type:
int - Since:
2.5.0 - Required:
No - Default:
-1
<keyPassphrase>
expect be on the PATH.
Note that the data type used is NOT String.
<configuration>
...
<keyPassphrase>
<passphrase>password</passphrase>
</keyPassphrase>
</configuration>
If not given, look up the value under Maven settings using server id at 'keyPassphraseServerId' configuration.- Type:
org.codehaus.mojo.rpm.Passphrase - Since:
2.0-beta-4 - Required:
No
<keyname>
- Type:
java.lang.String - Required:
No - User Property:
gpg.keyname
<keypath>
~/.gnupg or %APPDATA%/gnupg.- Type:
java.io.File - Since:
2.1.2 - Required:
No - User Property:
gpg.homedir
<license>
- Type:
java.lang.String - Since:
2.1-alpha-4 - Required:
No
<mappings>
- Type:
java.util.List<org.codehaus.mojo.rpm.Mapping> - Required:
No
<name>
- Type:
java.lang.String - Required:
Yes - User Property:
rpm.name - Default:
${project.artifactId}
<needarch>
For passivity purposes, a value of true or false will indicate whether the architecture of the build machine will be used. Any other value (such as x86_64) will set the architecture of the rpm to x86_64.
This can also be used in conjunction with Source targetArchitecture to flex the contents of the rpm based on the architecture.
- Type:
java.lang.String - Required:
No
<numericModifierAsRelease>
1 in 1.0.0-1, is used as the release instead of having _1 appended to it. With true, version 1.0.0-1 gives version 1.0.0 and release 1; the default gives release 1_1. Only applies if release is not set.- Type:
boolean - Since:
2.5.0 - Required:
No - User Property:
rpm.numericModifierAsRelease - Default:
false
<obsoletes>
- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.0-beta-3 - Required:
No
<packager>
- Type:
java.lang.String - Required:
No - User Property:
rpm.packager - Default:
${project.organization.name}
<passphraseServerId>
- Type:
java.lang.String - Required:
No - User Property:
gpg.passphraseServerId - Default:
gpg.passphrase
<postinstallScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<postremoveScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<posttransScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<preambleLines>
%description. Use them for tags and macros that have no parameter of their own, such as %{?systemd_requires}. The plugin does not check the lines. The default is no lines.- Type:
java.util.List<java.lang.String> - Since:
2.5.0 - Required:
No
<prefix>
- Type:
java.lang.String - Required:
No
<prefixes>
- Type:
java.util.List<java.lang.String> - Since:
2.1-alpha-4 - Required:
No
<preinstallScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<prepareScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<preremoveScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<prereqs>
- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.0-beta-3 - Required:
No
<pretransScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<projversion>
- Type:
java.lang.String - Required:
Yes - User Property:
rpm.version - Default:
${project.version} - Alias:
version
<provides>
- Type:
java.util.LinkedHashSet<java.lang.String> - Required:
No
<recommends>
Recommends tags after the conflicts. Older versions of rpm ignore these tags.- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.5.0 - Required:
No
<release>
Beginning with 2.0-beta-2, this is an optional parameter. By default, the release will be generated from the modifier portion of the project version using the following rules:
- If no modifier exists, the release will be
1. - If the modifier ends with SNAPSHOT, the timestamp (in UTC) of the build will be appended to end.
- All instances of
'-'in the modifier will be replaced with'_'. - If the modifier is numeric and numericModifierAsRelease is
true, it will be used as the release. - If a modifier exists, does not end with SNAPSHOT, and is not used as the release,
"_1"will be appended to end.
- Type:
java.lang.String - Required:
No - User Property:
rpm.release
<releaseProperty>
- Type:
java.lang.String - Since:
2.1-alpha-2 - Required:
Yes - Default:
rpm.release
<repackJars>
false. If it is false brp-repack-jars will be disabled by:
%define __jar_repack 0 This will have no effect on RHEL5 or earlier release.- Type:
boolean - Since:
2.1-alpha-4 - Required:
No
<requires>
- Type:
java.util.LinkedHashSet<java.lang.String> - Required:
No
<requiresPost>
- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.1.6 - Required:
No
<requiresPre>
- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.1.6 - Required:
No
<requiresPreun>
- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.1.6 - Required:
No
<rpmbuildArgs>
rpmbuild, in the order given and placed just before the spec file name. Use them for options the plugin has no parameter for, such as --rcfile, whose value is a separate argument. The plugin does not check them. The default is no arguments.- Type:
java.util.List<java.lang.String> - Since:
2.5.0 - Required:
No - User Property:
rpm.rpmbuildArgs
<rpmbuildStage>
- Type:
java.lang.String - Required:
No - User Property:
rpm.rpmbuild.stage - Default:
-bb - Alias:
rpmbuildStage
<signHashAlgorithm>
SHA512. It defines the %_gpg_digest_algo macro. If not given, the GPG default applies.- Type:
java.lang.String - Since:
2.5.0 - Required:
No - User Property:
gpg.signHashAlgorithm
<skipPOMs>
true, nothing will happen during execution in projects with packaging "pom".- Type:
boolean - Since:
2.1.6 - Required:
No - Default:
false
<suggests>
Suggests tags after the conflicts. Older versions of rpm ignore these tags.- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.5.0 - Required:
No
<summary>
- Type:
java.lang.String - Required:
No - User Property:
rpm.summary - Default:
${project.name}
<supplements>
Supplements tags after the conflicts. Older versions of rpm ignore these tags.- Type:
java.util.LinkedHashSet<java.lang.String> - Since:
2.5.0 - Required:
No
<targetOS>
This can be used in conjunction with Source targetOSName to flex the contents of the rpm based on operating system.
- Type:
java.lang.String - Since:
2.0-beta-3 - Required:
No
<targetVendor>
- Type:
java.lang.String - Since:
2.0-beta-3 - Required:
No
<triggers>
<triggers>
<installTrigger>
<subpackage>optional</subpackage>
<program>program to execute (if not shell) optional</program>
<script>actual contents of script - optional</script>
<scriptFile>location of file containing script, or classpath:resource - optional</script>
<fileEncoding>character encoding for script file - recommended</fileEncoding>
<triggers>
<trigger>package/version to trigger on (i.e. jre > 1.5)</trigger>
...
</triggers>
</installTrigger>
<removeTrigger>
...
</removeTrigger>
<postRemoveTrigger>
...
</postRemoveTrigger>
...
</triggers>
See also: BaseTrigger
- Type:
java.util.List<org.codehaus.mojo.rpm.BaseTrigger> - Since:
2.0-beta-4 - Required:
No
<url>
- Type:
java.lang.String - Required:
No - User Property:
rpm.url - Default:
${project.organization.url}
<vendor>
- Type:
java.lang.String - Required:
No - User Property:
rpm.vendor - Default:
${project.organization.name}
<verifyScriptlet>
- Type:
org.codehaus.mojo.rpm.Scriptlet - Since:
2.0-beta-4 - Required:
No
<versionProperty>
- Type:
java.lang.String - Since:
2.1-alpha-2 - Required:
Yes - Default:
rpm.version
<workarea>
NOTE: The absolute path to the workarea MUST NOT have a space in any of the directory names.
Beginning with release 2.0-beta-3, sub-directories will be created within the workarea for each execution of the plugin within a life cycle.
The pattern will be workarea/name[-classifier], not one directory per execution.
The classifier portion is only applicable for the attached-rpm goal. Give each attached-rpm execution that builds a package of the same name a distinct classifier.
- Type:
java.io.File - Required:
No - Default:
${project.build.directory}/rpm

