You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2012/03/21 20:49:17 UTC
svn commit: r1303537 - in /maven/sandbox/trunk/rpm: ./ pom.xml src/
src/main/ src/main/rpm/ src/main/rpm/etc/ src/main/rpm/etc/profile.d/
src/main/rpm/etc/profile.d/maven.sh
Author: brett
Date: Wed Mar 21 19:49:17 2012
New Revision: 1303537
URL: http://svn.apache.org/viewvc?rev=1303537&view=rev
Log:
initial stab at an RPM generating module from a release tarball
This file was originally authored by Carlos Sanchez
Added:
maven/sandbox/trunk/rpm/
maven/sandbox/trunk/rpm/pom.xml (with props)
maven/sandbox/trunk/rpm/src/
maven/sandbox/trunk/rpm/src/main/
maven/sandbox/trunk/rpm/src/main/rpm/
maven/sandbox/trunk/rpm/src/main/rpm/etc/
maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/
maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/maven.sh (with props)
Added: maven/sandbox/trunk/rpm/pom.xml
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/rpm/pom.xml?rev=1303537&view=auto
==============================================================================
--- maven/sandbox/trunk/rpm/pom.xml (added)
+++ maven/sandbox/trunk/rpm/pom.xml Wed Mar 21 19:49:17 2012
@@ -0,0 +1,157 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<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>
+
+ <parent>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven</artifactId>
+ <!-- NOTE: no dashes allowed in version -->
+ <version>3.0.4</version>
+ </parent>
+
+ <groupId>org.apache.maven.rpm</groupId>
+ <artifactId>maven</artifactId>
+ <packaging>rpm</packaging>
+ <name>Maven Distribution RPM</name>
+ <description>Maven distribution</description>
+
+ <properties>
+ <rpm.source.location>${project.build.directory}/rpm-unpack/maven</rpm.source.location>
+ <rpm.username>root</rpm.username>
+ <rpm.groupname>root</rpm.groupname>
+ <!-- where the rpm will be installed -->
+ <installationPath>/usr/local</installationPath>
+ <installationFolder>${project.artifactId}</installationFolder>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>apache-maven</artifactId>
+ <version>${project.version}</version>
+ <type>tar.gz</type>
+ <classifier>bin</classifier>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <configuration>
+ <excludeTransitive>true</excludeTransitive>
+ <includeTypes>tar.gz</includeTypes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>unpack-tarballs</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/rpm-unpack</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <configuration>
+ <mappings>
+ <mapping>
+ <directory>${installationPath}/${installationFolder}</directory>
+ <sources>
+ <source>
+ <location>${rpm.source.location}</location>
+ <excludes>
+ <exclude>bin/mvn*</exclude>
+ </excludes>
+ </source>
+ </sources>
+ </mapping>
+ <!-- bin files -->
+ <mapping>
+ <directory>${installationPath}/${installationFolder}/bin</directory>
+ <filemode>755</filemode>
+ <sources>
+ <source>
+ <location>${rpm.source.location}/bin</location>
+ <includes>
+ <include>mvn*</include>
+ </includes>
+ </source>
+ </sources>
+ </mapping>
+ <!-- bin files link from /usr/local/bin -->
+ <mapping>
+ <directory>/usr/local/bin</directory>
+ <sources>
+ <softlinkSource>
+ <location>${installationPath}/${installationFolder}/bin</location>
+ <includes>
+ <include>mvn*</include>
+ </includes>
+ <excludes>
+ <exclude>*.bat</exclude>
+ </excludes>
+ </softlinkSource>
+ </sources>
+ </mapping>
+ <!-- files that will go into root folder -->
+ <mapping>
+ <directory>/</directory>
+ <directoryIncluded>false</directoryIncluded>
+ <sources>
+ <source>
+ <location>${basedir}/src/main/rpm</location>
+ </source>
+ </sources>
+ </mapping>
+ </mappings>
+<!-- Some users refer openjdk, so leaving out this requirement for now
+ <requires>
+ <require>jdk > 1.5.0</require>
+ </requires>
+-->
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.4</version>
+ </plugin>
+ <!-- NOTE !!!
+ needs $HOME/.rpmmacros with content:
+ %_tmppath /tmp
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>rpm-maven-plugin</artifactId>
+ <version>2.1-alpha-1</version>
+ <extensions>true</extensions>
+ <configuration>
+ <!-- Hack "BuildArch: noarch" into the spec file to make sure the rpm is noarch
+ command line parameter "target" 'noarch' doesn't work (at least in os x)
+ See: https://jira.codehaus.org/browse/MRPM-79
+ -->
+ <group>Development/Tools
+BuildArch: noarch
+ </group>
+ <defaultUsername>${rpm.username}</defaultUsername>
+ <defaultGroupname>${rpm.groupname}</defaultGroupname>
+ <defaultFilemode>644</defaultFilemode>
+ <defaultDirmode>755</defaultDirmode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
Propchange: maven/sandbox/trunk/rpm/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/maven.sh
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/maven.sh?rev=1303537&view=auto
==============================================================================
--- maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/maven.sh (added)
+++ maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/maven.sh Wed Mar 21 19:49:17 2012
@@ -0,0 +1,2 @@
+export M2_HOME=/usr/local/maven
+export PATH=$PATH:$M2_HOME/bin
Propchange: maven/sandbox/trunk/rpm/src/main/rpm/etc/profile.d/maven.sh
------------------------------------------------------------------------------
svn:eol-style = native