linux maven 编译 hadoop,Cloudera Hadoop Maven编译安装步骤详细教程

Cloudera Hadoop Maven编译安装步骤详细教程

OS: Ubuntu 12.04

1.下载hadoop-0.20.2-cdh3u6.tar.gz源码包

2.安装配置maven源

/etc/maven2/settings.xml

apt-get install maven2

3.到search.maven.org上搜索下载缺少的jar包

jar包列表:

org.apache.maven.doxia:doxia-module-confluence:jar:1.1.3

org.apache.maven.doxia:doxia-module-apt:jar:1.1.3

org.apache.maven.doxia:doxia-module-xdoc:jar:1.1.3

org.codehaus.plexus:plexus-utils:jar:1.5.9

org.apache.maven.surefire:surefire-booter:jar:2.5

org.apache.maven.plugins:maven-surefire-plugin:jar:2.5

搜索方式

g:"org.apache.maven.plugins" AND a:"maven-surefire-plugin" AND v:"2.5"

groupIP artifact version

4.安装jar包

mvn install:install-file -DgroupId=org.apache.maven.doxia -DartifactId=doxia-module-confluence -Dversion=1.1.3 -Dpackaging=jar -Dfile=/path/to/file

需要指定groupID、artifactID、version

5.修改cloudera/maven-packaging/pom.xml

为解决package过程中的如下ERROR

[ERROR] BUILD ERROR

[INFO] ------------------------------------------------------------------------

[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-surefire-plugin:2.5:test': Unable to load the mojo 'org.apache.maven.plugins:maven-surefire-plugin:2.5:test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin'. A required class is missing: org/apache/maven/surefire/util/NestedCheckedException

org.apache.maven.surefire.util.NestedCheckedException

mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-surefire-plugin -Dversion=2.16 -Dpackaging=jar -Dfile=/path/to/file

A required class is missing: org/apache/maven/surefire/util/NestedCheckedException

需要在增加cloudera/maven-packaging/pom.xml 中增加plugin配置

org.apache.maven.plugins

maven-surefire-plugin

true

2.16

6.编译hadoop

mvn -f cloudera/maven-packaging/pom.xml package -DskipTests=true

0b1331709591d260c1c78e86d0c51c18.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值