Fork me on GitHub

rpm:attached-rpm

Full name:

org.codehaus.mojo:rpm-maven-plugin:2.2.0:attached-rpm

Description:

Construct the RPM file and attaches it as a secondary artifact.

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.
  • Since version: 2.0-beta-2.
  • Binds by default to the lifecycle phase: package.

Required Parameters

Name Type Since Description
group String 2.0-beta-2 The package group for the package.
name String 2.0-beta-2 The name portion of the output file name.
Default value is: ${project.artifactId}.
User property is: rpm.name.
projversion String 2.0-beta-2 The version portion of the RPM file name.
Default value is: ${project.version}.
User property is: rpm.version.
releaseProperty String 2.1-alpha-2 The system property to read the calculated release from, normally set by the version mojo.
Default value is: rpm.release.
versionProperty String 2.1-alpha-2 The system property to read the calculated version from, normally set by the version mojo.
Default value is: rpm.version.

Optional Parameters

Name Type Since Description
autoProvides boolean 2.0-beta-4 Automatically add provided shared libraries.
Default value is: true.
autoRequires boolean 2.0-beta-4 Automatically add requirements deduced from included shared libraries.
Default value is: true.
buildRequires LinkedHashSet 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.
classifier String 2.0-beta-2 The classifier for the rpm secondary artifact.
cleanScriptlet Scriptlet 2.0-beta-4 The clean scriptlet.
conflicts LinkedHashSet 2.0-beta-2 The list of conflicts for this package.
copyTo File 2.1. Option to copy the created RPM to another location
User property is: 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 2.0-beta-2 A list of %define arguments
description String 2.0-beta-2 The long description of the package.
Default value is: ${project.description}.
User property is: rpm.description.
disabled boolean 2.0 Indicates if the execution should be disabled. If true, nothing will occur during execution.
Default value is: false.
User property is: rpm.disabled.
distribution String 2.0-beta-2 The distribution containing this package.
epoch String 2.0-beta-2 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 is: maven.rpm.escapeString.
filters List 2.0 Filters (property files) to include during the interpolation of the pom.xml.
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 value is: false.
icon File 2.0-beta-2 An icon for the package.
installScriptlet Scriptlet 2.0-beta-4 The installation scriptlet.
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 String.

<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 2.0-beta-2 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 is: 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 is: gpg.homedir.
license String 2.1-alpha-4 The one-line license information.
mappings List 2.0-beta-2 The list of file mappings.
needarch String 2.0-beta-2 The target architecture for the rpm. The default value is noarch.

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.


obsoletes LinkedHashSet 2.0-beta-3 The list of obsoletes for this package.
packager String 2.0-beta-2 The name of the person or group creating the package.
Default value is: ${project.organization.name}.
User property is: rpm.packager.
passphraseServerId String 2.0-beta-2 Server id to lookup the gpg passphrase under Maven settings. The default value intentionally selected to match with maven-gpg-plugin.
Default value is: gpg.passphrase.
User property is: 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.
prefix String 2.0-beta-2 The relocation prefix for this package.
prefixes List 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 2.0-beta-3 The list of prerequisites for this package.
pretransScriptlet Scriptlet 2.0-beta-4 The pretrans scriptlet.
provides LinkedHashSet 2.0-beta-2 The list of virtual packages provided by this package.
release String 2.0-beta-2 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:

  • 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 a modifier exists and does not end with SNAPSHOT, "_1" will be appended to end.



User property is: 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 2.0-beta-2 The list of requirements for this package.
requiresPost LinkedHashSet 2.1.6 The list of requirements for running the post install scriptlet.
requiresPre LinkedHashSet 2.1.6 The list of requirements for running the pre-installation scriptlet.
requiresPreun LinkedHashSet 2.1.6 The list of requirements for running the pre-removal scriptlet.
rpmbuildStage String 2.0-beta-2 The stage to build. Default to '-bb' but let users specify for instance '-ba' if they want source rpms as well.
Default value is: -bb.
User property is: rpm.rpmbuild.stage.
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 value is: false.
summary String 2.0-beta-2 The one-line description of the package.
Default value is: ${project.name}.
User property is: rpm.summary.
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 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 - 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>

url String 2.0-beta-2 A URL for the vendor.
Default value is: ${project.organization.url}.
User property is: rpm.url.
vendor String 2.0-beta-2 The vendor supplying the package.
Default value is: ${project.organization.name}.
User property is: rpm.vendor.
verifyScriptlet Scriptlet 2.0-beta-4 The verify scriptlet.
workarea File 2.0-beta-2 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.
The pattern will be workarea/name[-classifier].
The classifier portion is only applicable for the attached-rpm goal.


Default value is: ${project.build.directory}/rpm.

Parameter Details

autoProvides:

Automatically add provided shared libraries.
  • Type: boolean
  • Since: 2.0-beta-4
  • Required: No
  • Default: true

autoRequires:

Automatically add requirements deduced from included shared libraries.
  • Type: boolean
  • Since: 2.0-beta-4
  • Required: No
  • Default: true

buildRequires:

The list of build requirements for this package.
  • Type: java.util.LinkedHashSet
  • Since: 2.1.6
  • Required: No

changelogFile:

The changelog file. If the file does not exist, it is ignored.
  • Type: java.io.File
  • Since: 2.0-beta-3
  • Required: No

classifier:

The classifier for the rpm secondary artifact.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No

cleanScriptlet:

The clean scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

conflicts:

The list of conflicts for this package.
  • Type: java.util.LinkedHashSet
  • Since: 2.0-beta-2
  • Required: No

copyTo:

Option to copy the created RPM to another location
  • Type: java.io.File
  • Since: 2.1.
  • Required: No
  • User Property: rpm.copyTo

defaultDirmode:

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.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No

defaultFilemode:

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.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No

defaultGroupname:

The default group name for files when installed.
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:

The default user name for files when installed.
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:

A list of %define arguments
  • Type: java.util.List
  • Since: 2.0-beta-2
  • Required: No

description:

The long description of the package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.description
  • Default: ${project.description}

disabled:

Indicates if the execution should be disabled. If true, nothing will occur during execution.
  • Type: boolean
  • Since: 2.0
  • Required: No
  • User Property: rpm.disabled
  • Default: false

distribution:

The distribution containing this package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No

epoch:

The epoch of this package. As defined here: http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-tags.html
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No

escapeString:

Expression preceded with the String won't be interpolated \${foo} will be replaced with ${foo}
  • Type: java.lang.String
  • Since: 2.0
  • Required: No
  • User Property: maven.rpm.escapeString

filters:

Filters (property files) to include during the interpolation of the pom.xml.
  • Type: java.util.List
  • Since: 2.0
  • Required: No

group:

The package group for the package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: Yes

hardLinkDependencies:

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.
  • Type: boolean
  • Since: TODO
  • Required: No
  • Default: false

icon:

An icon for the package.
  • Type: java.io.File
  • Since: 2.0-beta-2
  • Required: No

installScriptlet:

The installation scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

keyPassphrase:

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 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:

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.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: gpg.keyname

keypath:

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.
  • Type: java.io.File
  • Since: 2.1.2
  • Required: No
  • User Property: gpg.homedir

license:

The one-line license information.
  • Type: java.lang.String
  • Since: 2.1-alpha-4
  • Required: No

mappings:

The list of file mappings.
  • Type: java.util.List
  • Since: 2.0-beta-2
  • Required: No

name:

The name portion of the output file name.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: Yes
  • User Property: rpm.name
  • Default: ${project.artifactId}

needarch:

The target architecture for the rpm. The default value is noarch.

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
  • Since: 2.0-beta-2
  • Required: No

obsoletes:

The list of obsoletes for this package.
  • Type: java.util.LinkedHashSet
  • Since: 2.0-beta-3
  • Required: No

packager:

The name of the person or group creating the package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.packager
  • Default: ${project.organization.name}

passphraseServerId:

Server id to lookup the gpg passphrase under Maven settings. The default value intentionally selected to match with maven-gpg-plugin.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: gpg.passphraseServerId
  • Default: gpg.passphrase

postinstallScriptlet:

The post install scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

postremoveScriptlet:

The post-removal scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

posttransScriptlet:

The posttrans script.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

prefix:

The relocation prefix for this package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No

prefixes:

Additional relocation prefixes if needed.
  • Type: java.util.List
  • Since: 2.1-alpha-4
  • Required: No

preinstallScriptlet:

The pre-installation scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

prepareScriptlet:

The prepare scriptlet;
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

preremoveScriptlet:

The pre-removal scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

prereqs:

The list of prerequisites for this package.
  • Type: java.util.LinkedHashSet
  • Since: 2.0-beta-3
  • Required: No

pretransScriptlet:

The pretrans scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

projversion:

The version portion of the RPM file name.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: Yes
  • User Property: rpm.version
  • Default: ${project.version}

provides:

The list of virtual packages provided by this package.
  • Type: java.util.LinkedHashSet
  • Since: 2.0-beta-2
  • Required: No

release:

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:

  • 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 a modifier exists and does not end with SNAPSHOT, "_1" will be appended to end.


  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.release

releaseProperty:

The system property to read the calculated release from, normally set by the version mojo.
  • Type: java.lang.String
  • Since: 2.1-alpha-2
  • Required: Yes
  • Default: rpm.release

repackJars:

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.
  • Type: boolean
  • Since: 2.1-alpha-4
  • Required: No

requires:

The list of requirements for this package.
  • Type: java.util.LinkedHashSet
  • Since: 2.0-beta-2
  • Required: No

requiresPost:

The list of requirements for running the post install scriptlet.
  • Type: java.util.LinkedHashSet
  • Since: 2.1.6
  • Required: No

requiresPre:

The list of requirements for running the pre-installation scriptlet.
  • Type: java.util.LinkedHashSet
  • Since: 2.1.6
  • Required: No

requiresPreun:

The list of requirements for running the pre-removal scriptlet.
  • Type: java.util.LinkedHashSet
  • Since: 2.1.6
  • Required: No

rpmbuildStage:

The stage to build. Default to '-bb' but let users specify for instance '-ba' if they want source rpms as well.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.rpmbuild.stage
  • Default: -bb

skipPOMs:

Indicates if the execution should be disabled for POM projects. If true, nothing will happen during execution in projects with packaging "pom".
  • Type: boolean
  • Since: 2.1.6
  • Required: No
  • Default: false

summary:

The one-line description of the package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.summary
  • Default: ${project.name}

targetOS:

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.

  • Type: java.lang.String
  • Since: 2.0-beta-3
  • Required: No

targetVendor:

The target vendor for building the RPM. By default, this will be populated to the result of rpm -E %{_host_vendor}.
  • Type: java.lang.String
  • Since: 2.0-beta-3
  • Required: No

triggers:

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 - 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>
  • Type: java.util.List
  • Since: 2.0-beta-4
  • Required: No

url:

A URL for the vendor.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.url
  • Default: ${project.organization.url}

vendor:

The vendor supplying the package.
  • Type: java.lang.String
  • Since: 2.0-beta-2
  • Required: No
  • User Property: rpm.vendor
  • Default: ${project.organization.name}

verifyScriptlet:

The verify scriptlet.
  • Type: org.codehaus.mojo.rpm.Scriptlet
  • Since: 2.0-beta-4
  • Required: No

versionProperty:

The system property to read the calculated version from, normally set by the version mojo.
  • Type: java.lang.String
  • Since: 2.1-alpha-2
  • Required: Yes
  • Default: rpm.version

workarea:

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.
The pattern will be workarea/name[-classifier].
The classifier portion is only applicable for the attached-rpm goal.

  • Type: java.io.File
  • Since: 2.0-beta-2
  • Required: No
  • Default: ${project.build.directory}/rpm