-
Notifications
You must be signed in to change notification settings - Fork 12
Home
Simon Paulger edited this page Mar 29, 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 using Ant glob pattern matching, and with appropriate RPM parameters, including: name, version, release, prefixes, dependencies, conflicts, obsoletes, url group, license, summary, description, architecture, operating system, build host name, and packager
- RPM package signing
- event script and trigger templates with MVEL
- operating system agnostic
To apply the plugin, simply apply the following XML appropriately to your projects 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>
Read the configuration documentation on how to make further configuration changes specific to your maven project.