-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Simon Paulger edited this page Mar 28, 2015
·
16 revisions
redlinerpm-maven-plugin is a maven plugin for packaging a maven project in to one or more RPM packages.
The plugin uses the Redline RPM Java library, which is a Java based operating system agnostic package available from the Central repository. It is written to require Maven v3+ and Java 1.6+.
The plugin is also available via the Maven Central repository, making it easy to integrate in to any existing maven project without having to download and install the plugin manually.
In summary, the plugin is capable of the following;
- packaging a maven projects output files in to one or more RPM package files
- associating the RPM package files with appropriate RPM parameters, including name, version, release, dependencies, conflicts, obsoletes,
- RPM package signing
- event scripts and triggers
- operating system agnostic
To apply the plugin, simply add the appropriate XML to the plugins tag within the relevant POM file.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>my-project</artifactId>
<version>1.0</version>
<packaging>rpm</packaging>
<build>
<plugins>
<plugin>
<groupId>uk.co.codezen</groupId>
<artifactId>redlinerpm-maven-plugin</artifactId>
<version>1.0</version>
<extensions>true</extensions>
<configuration>
<defaultUser>apache</defaultUser>
<defaultGroup>apache</defaultGroup>
<defaultDestination>/var/www/${project.build.name}</defaultDestination>
<excludes>
<source>**/*.bak</source>
</excludes>
<packages>
<package>
<rules>
<rule>
<includes>
<include>**/*.ini</include>
</includes>
<directives>
<directive>config</directive>
<directive>noreplace</directive>
</directives>
</rule>
<rule>
<includes>
<include>**/*</include>
</includes>
<excludes>
<exclude>**/*.bak</exclude>
<exclude>**/*.ini</exclude>
<exclude>cache/*.php</exclude>
</excludes>
</rule>
</rules>
</package>
</packages>
</configuration>
</plugin>
</plugins>
</build>
</project>
Checkout out the configuration documentation on how to apply the plugin to your maven project.