Permalink
Browse files

Created pom.xml to build hadoop-lzo.

  • Loading branch information...
1 parent aef672c commit 19adebe9f399d4198c8bad0b5779c4863954341b Sangjin Lee committed May 30, 2013
Showing with 272 additions and 0 deletions.
  1. +272 −0 pom.xml
  2. 0 {src → scripts}/get_build_revision.sh
View
272 pom.xml
@@ -0,0 +1,272 @@
+<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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.hadoop.gplcompression</groupId>
+ <artifactId>hadoop-lzo</artifactId>
+ <version>0.4.17-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>hadoop-lzo</name>
+ <url>https://github.com/twitter/hadoop-lzo</url>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.5.1</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>set-props</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <exportAntProperties>true</exportAntProperties>
+ <target name="set-props" description="sets key properties that are used throughout">
+ <exec executable="sed" inputstring="${os.name}" outputproperty="nonspace.os">
+ <arg value="s/ /_/g"/>
+ </exec>
+ <property name="build.platform" value="${nonspace.os}-${os.arch}-${sun.arch.data.model}"/>
+ <property name="build.native" value="${project.build.directory}/native/${build.platform}"/>
+ <property name="native.src.dir" value="${basedir}/src/main/native"/>
+ <property name="test.build.dir" value="${project.build.directory}/test-classes"/>
+ <property name="test.log.dir" value="${test.build.dir}/logs"/>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>build-info</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target name="build-info" description="generates build.properties">
+ <tstamp>
+ <format property="build_time" pattern="MM/dd/yyyy hh:mm aa" timezone="GMT"/>
+ </tstamp>
+ <exec executable="${basedir}/scripts/get_build_revision.sh" outputproperty="build_revision"/>
+ <exec executable="whoami" outputproperty="build_author"/>
+ <exec executable="uname" outputproperty="build_os">
+ <arg value="-a"/>
+ </exec>
+ <propertyfile file="${project.build.outputDirectory}/build.properties"
+ comment="This file is automatically generated - DO NOT EDIT">
+ <entry key="build_time" value="${build_time}"/>
+ <entry key="build_revision" value="${build_revision}"/>
+ <entry key="build_author" value="${build_author}"/>
+ <entry key="build_version" value="${project.version}"/>
+ <entry key="build_os" value="${build_os}"/>
+ </propertyfile>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>check-native-uptodate</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <exportAntProperties>true</exportAntProperties>
+ <target name="check-native-uptodate" description="checks if native binaries should be rebuilt">
+ <uptodate property="native.uptodate" targetfile="${build.native}/lib/libgplcompression.la">
+ <srcfiles dir="${native.src.dir}" includes="**/*"/>
+ </uptodate>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>build-native</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target name="build-native" unless="native.uptodate" description="compiles native code">
+ <property name="make.cmd" value="make"/>
+ <property name="build.classes" refid="maven.compile.classpath"/>
+ <condition property="native.ldflags" value="" else="-Wl,--no-as-needed">
+ <os family="mac"/>
+ </condition>
+
+ <mkdir dir="${build.native}/lib"/>
+ <mkdir dir="${build.native}/src/com/hadoop/compression/lzo"/>
+
+ <javah classpath="${build.classes}"
+ destdir="${build.native}/src/com/hadoop/compression/lzo"
+ force="yes"
+ verbose="yes">
+ <class name="com.hadoop.compression.lzo.LzoCompressor" />
+ <class name="com.hadoop.compression.lzo.LzoDecompressor" />
+ </javah>
+
+ <exec dir="${build.native}" executable="sh" failonerror="true">
+ <env key="OS_NAME" value="${os.name}"/>
+ <env key="OS_ARCH" value="${os.arch}"/>
+ <env key="LDFLAGS" value="${native.ldflags}"/>
+ <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/>
+ <env key="NATIVE_SRCDIR" value="${native.src.dir}"/>
+ <arg line="${native.src.dir}/configure"/>
+ </exec>
+
+ <exec dir="${build.native}" executable="${make.cmd}" failonerror="true">
+ <env key="OS_NAME" value="${os.name}"/>
+ <env key="OS_ARCH" value="${os.arch}"/>
+ <env key="JVM_DATA_MODEL" value="${sun.arch.data.model}"/>
+ <env key="HADOOP_NATIVE_SRCDIR" value="${native.src.dir}"/>
+ </exec>
+
+ <exec dir="${build.native}" executable="sh" failonerror="true">
+ <arg line="${build.native}/libtool --mode=install cp ${build.native}/libgplcompression.la ${build.native}/lib"/>
+ </exec>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>prep-test</id>
+ <phase>test-compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target name="prep-test" description="creates the test log directory">
+ <delete dir="${test.log.dir}"/>
+ <mkdir dir="${test.log.dir}"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.9.0</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.14.1</version>
+ <configuration>
+ <reuseForks>false</reuseForks>
+ <argLine>-Djava.library.path=${build.native}/lib</argLine>
+ <systemPropertyVariables>
+ <test.build.data>${project.build.directory}/test-classes/data</test.build.data>
+ <hadoop.log.dir>${test.log.dir}</hadoop.log.dir>
+ <test.src.dir>${basedir}/src/test/java</test.src.dir>
+ <hadoop.policy.file>hadoop-policy.xml</hadoop.policy.file>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.2.1</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.9</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <versionRange>[1.7,)</versionRange>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-common</artifactId>
+ <version>2.0.4-alpha</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.hadoop</groupId>
+ <artifactId>hadoop-mapreduce-client-core</artifactId>
+ <version>2.0.4-alpha</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.2</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <url>https://github.com/twitter/hadoop-lzo.git</url>
+ </scm>
+ <issueManagement>
+ <url>https://github.com/twitter/hadoop-lzo/issues</url>
+ </issueManagement>
+ <ciManagement>
+ <url>https://travis-ci.org/twitter/hadoop-lzo</url>
+ </ciManagement>
+</project>
File renamed without changes.

0 comments on commit 19adebe

Please sign in to comment.