Hadoop build commands20 Sep 2015
You might have a experience when you cannot remember the command how to build in your purpose. How to skip tests? How to build tar.gz package? How to build native packages?
These information are in BUILDING.txt. So in this post, I’d like to file these command you may often use in your hadoop projects like a cheetsheet.
|-Dtar||Building package as tar.gz format with -Pdist.|
|-Pdist||Profile for building package for distribution.|
|-Pdocs||Generate documentation and bundle it with package with -Pdist.|
|-Pnative||Profile for building native source files.|
|-DskipTests||Skip all unit tests.|
trunk repository seems to have problem to build with JDK8. So this is the command when you want to build hadoop package simply.
$ cd hadoop $ cd JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home mvn -Pdist,native,tar -DskipTests -Dtar clean package
Hadoop project depends on ProtocolBuffer and other projects.
But there is no need to worry about it if you have a little knowledge about Docker. There is a definition and images
for building hadoop project on Docker. All these configurations are written in
start-build-env.sh. About this script the detail was written in this entry.