源码下载地址
https://github.com/search?utf8=%E2%9C%93&q=hortonworks&type=
编译命令
mvn versions:set -DnewVersion=3.1.1.3.0.1.0-187 package -Pdist -DskipTests -Dtar
【3.1.1版本的需要依赖2.5.0版本的protobuf】
maven库
<mirror>
<id>HDP</id>
<mirrorOf>central</mirrorOf>
<name>HDP maven repository</name>
<url>http://repo.hortonworks.com/content/groups/public/</url>
</mirror>
资源下载
protobuf下载地址
https://github.com/google/protobuf/releases(需要翻墙下载,或者在网上搜,资源上传不上去,说是已存在)
findbugs下载地址
http://findbugs.sourceforge.net/downloads.html(需要翻墙下载)
//===========================protoc安装=========================
#tar -zxvf protobuf-2.5.0.tar.gz
#cd protobuf-2.5.0
#./configure --prefix=/usr/local/protobuf
#make
#make check
#make install
//使用protoc --version检查版本
# protoc --version
libprotoc 2.5.0
//添加环境变量
#protoc 2.5.0
export PROTOBUF_HOME=/usr/local/protobuf
export PATH=$PATH:/usr/local/protobuf/bin
export PKG_CONFIG_PATH=/usr/local/protobuf/lib/pkgconfig/
//===========================findbug安装=========================
//添加环境变量
#findbugs 3.0.1
export FINDBUGS_HOME=/usr/local/findbugs-3.0.1
export PATH=$PATH:/usr/local/findbugs-3.0.1/bin
//验证
#findbugs -version
3.0.1
错误记录
1.编译时报错
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-banned-dependencies) on project hadoop-client-check-test-invariants: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]
...
[ERROR] mvn <goals> -rf :hadoop-client-check-test-invariants
解决:
再编译一下报错的模块即可
mvn versions:set -DnewVersion=3.1.1.3.0.1.0-187 package -Pdist,docs -DskipTests -Dtar -rf :hadoop-client-check-test-invariants