Thursday, May 24, 2012

Building Hadoop Source Jars

Script to build yourself the source jars for hadoop core:
  • Download a hadoop release from http://www.apache.org/dyn/closer.cgi/hadoop/common/
  • Unpack the tar.gz to a folder (in my case /opt/hadoop/)
  • Copy the script below into a file names mk-source.sh (Amend the VERSION and HADOOP_SRC variables for your environment)
  • Optionally install the sources into your local maven repository
    mvn install:install-file \
        -Dfile=/opt/hadoop/hadoop-0.20.2/src/hadoop-core-0.20.2-sources.jar \
        -DgroupId=org.apache.hadoop \
        -DartifactId=hadoop-core \
        -Dversion=0.20.2 \
        -Dpackaging=java-sources \
        -DgeneratePom=false

No comments:

Post a Comment