你好,游客 登录 注册 搜索
背景:
阅读新闻

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

[日期:2014-03-12] 来源:Linux社区  作者:ganglia [字体: ]

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

OS: Ubuntu 12.04

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

http://www.cloudera.com

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配置
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <skipTests>true</skipTests>
            </configuration>
    <version>2.16</version>

</plugin>

6.编译hadoop
mvn -f cloudera/maven-packaging/pom.xml package -DskipTests=true

更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2

更多Hadoop相关信息见Hadoop 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=13

linux
相关资讯       Hadoop编译  Cloudera Hadoop  Hadoop Maven 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款