Created
September 1, 2014 15:22
-
-
Save akiatoji/2ab99c14ede323cd713d to your computer and use it in GitHub Desktop.
Hadoop 2 map reduce builld.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Ever since Hadoop 2 deprecated hadoop-core.jar, building mapreduce jars isn't straightforward | |
especially if you want to use newer bits. | |
I just use this template ant build.xml that includes all hadoop jars, aaaaand all them variations | |
of the same lib jars that hadoop jars depend on. | |
hadoop.home is set to OS X homebrew, switch to whatever home is for the distribution. | |
--> | |
<project name="geo mapper" default="build" basedir="."> | |
<description> | |
Build geo mapper | |
</description> | |
<property name="src" location="src" /> | |
<property name="build" location="build" /> | |
<property name="hadoop.home" location="/usr/local/Cellar/hadoop/2.5.0" /> | |
<target name="init"> | |
<tstamp /> | |
<mkdir dir="${build}" /> | |
<mkdir dir="${build}/classes" /> | |
</target> | |
<target name="compile" depends="init" description="compile the source "> | |
<javac srcdir="${src}" destdir="${build}/classes" includeantruntime="false"> | |
<classpath> | |
<fileset dir="${hadoop.home}/libexec/share/hadoop"> | |
<include name="**/*.jar" /> | |
</fileset> | |
</classpath> | |
</javac> | |
</target> | |
<target name="build" depends="compile" description="generate the distribution"> | |
<jar jarfile="${build}/lib/geomapper.jar" basedir="${build}/classes" /> | |
</target> | |
<target name="clean" description="clean up"> | |
<delete dir="${build}" /> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment