全球彩票平台_全球彩票注册平台|官网下载地址

热门关键词: 全球彩票平台,全球彩票注册平台,全球彩官网下载地址

【全球彩票平台】新建的maven项目直接用maven编译

Hadoop的MapReduce意况是三个复杂的编制程序情形,所以大家要尽量地简化创设MapReduce项目标经过。Maven是三个很科学的自动化项目营造筑工程具,通过Maven来提携我们从犬牙相错的景况布署中解脱出来,进而规范开辟进程。所以,写MapReduce在此以前,让我们先花点时间把刀磨快!!当然,除了Maven还会有任何的挑三拣四Gradle(推荐), Ivy等 

正文主要表明什么选择maven的help插件查看其余maven插件提供的goal消息。

Maven编译hadoop-2.2.0-src

Maven编译Hadoop-2.2.0-src

1.环境

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 23:22:22 0800)
Maven home: /opt/maven
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.18-371.3.1.el5", arch: "amd64", family: "unix"

2.执行

mvn package -DskipTests -Pdist,native,docs -Dtar

3.插曲1

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hadoop-auth: Compilation failure: Compilation failure:
[ERROR] /home/chuan/trunk/hadoop-common-project/hadoop-auth/src/test/java/org/apache/hadoop/security/authentication/client/AuthenticatorTestCase.java:[84,13] cannot access org.mortbay.component.AbstractLifeCycle
[ERROR] class file for org.mortbay.component.AbstractLifeCycle not found

打补丁

Patch :

主意:修改hadoop源码目录下的hadoop-common-project/hadoop-auth/pom.xml

拉长或改变如下有些剧情:

      <dependency>
          <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <scope>test</scope>
  </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty</artifactId>
        <scope>test</scope>
    </dependency>

4.插曲2

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (make) on project hadoop-common: An Ant BuildException has occured: Execute failed: java.io.IOException: Cannot run program "cmake" (in directory "/opt/hadoop-2.2.0-src/hadoop-common-project/hadoop-common/target/native"): error=2, No such file or directory -> [Help 1]

没装cmake

居家正是想要那一个地点 那可非常  果决

yum install cmake

5.插曲3

[ERROR] Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.hadoop:hadoop-maven-plugins:2.2.0:protoc (compile-protoc) on project hadoop-common: org.apache.maven.plugin.MojoExecutionException: 'protoc --version' did not return a version

没装protobuf-2.5.0。

下载protobuf-2.5.0.tar.gz  解压  3部曲编写翻译安装。

6.连任(此次学能了,带着debug)

mvn package -Pdist,native -DskipTests -Dtar -e -X

等了好久好久

[INFO] Reactor Summary:
[INFO]
[INFO] Apache Hadoop Main ................................ SUCCESS [2:18.165s]
[INFO] Apache Hadoop Project POM ......................... SUCCESS [50.526s]
[INFO] Apache Hadoop Annotations ......................... SUCCESS [1:14.522s]
[INFO] Apache Hadoop Assemblies .......................... SUCCESS [0.760s]
[INFO] Apache Hadoop Project Dist POM .................... SUCCESS [5.983s]
[INFO] Apache Hadoop Maven Plugins ....................... SUCCESS [13.161s]
[INFO] Apache Hadoop Auth ................................ SUCCESS [10.647s]
[INFO] Apache Hadoop Auth Examples ....................... SUCCESS [5.010s]
[INFO] Apache Hadoop Common .............................. SUCCESS [4:32.249s]
[INFO] Apache Hadoop NFS ................................. SUCCESS [18.927s]
[INFO] Apache Hadoop Common Project ...................... SUCCESS [0.134s]
[INFO] Apache Hadoop HDFS ................................ SUCCESS [5:29.380s]
[INFO] Apache Hadoop HttpFS .............................. SUCCESS [1:43.219s]
[INFO] Apache Hadoop HDFS BookKeeper Journal ............. SUCCESS [44.693s]
[INFO] Apache Hadoop HDFS-NFS ............................ SUCCESS [13.217s]
[INFO] Apache Hadoop HDFS Project ........................ SUCCESS [0.219s]
[INFO] hadoop-yarn ....................................... SUCCESS [1.957s]
[INFO] hadoop-yarn-api ................................... SUCCESS [1:36.233s]
[INFO] hadoop-yarn-common ................................ SUCCESS [1:31.987s]
[INFO] hadoop-yarn-server ................................ SUCCESS [0.334s]
[INFO] hadoop-yarn-server-common ......................... SUCCESS [26.932s]
[INFO] hadoop-yarn-server-nodemanager .................... SUCCESS [49.536s]
[INFO] hadoop-yarn-server-web-proxy ...................... SUCCESS [7.882s]
[INFO] hadoop-yarn-server-resourcemanager ................ SUCCESS [1:01.936s]
[INFO] hadoop-yarn-server-tests .......................... SUCCESS [6.642s]
[INFO] hadoop-yarn-client ................................ SUCCESS [11.930s]
[INFO] hadoop-yarn-applications .......................... SUCCESS [0.437s]
[INFO] hadoop-yarn-applications-distributedshell ......... SUCCESS [12.064s]
[INFO] hadoop-mapreduce-client ........................... SUCCESS [1.363s]
[INFO] hadoop-mapreduce-client-core ...................... SUCCESS [58.193s]
[INFO] hadoop-yarn-applications-unmanaged-am-launcher .... SUCCESS [11.262s]
[INFO] hadoop-yarn-site .................................. SUCCESS [0.328s]
[INFO] hadoop-yarn-project ............................... SUCCESS [17.453s]
[INFO] hadoop-mapreduce-client-common .................... SUCCESS [43.479s]
[INFO] hadoop-mapreduce-client-shuffle ................... SUCCESS [6.048s]
[INFO] hadoop-mapreduce-client-app ....................... SUCCESS [46.449s]
[INFO] hadoop-mapreduce-client-hs ........................ SUCCESS [9.770s]
[INFO] hadoop-mapreduce-client-jobclient ................. SUCCESS [17.249s]
[INFO] hadoop-mapreduce-client-hs-plugins ................ SUCCESS [9.929s]
[INFO] Apache Hadoop MapReduce Examples .................. SUCCESS [12.193s]
[INFO] hadoop-mapreduce .................................. SUCCESS [6.817s]
[INFO] Apache Hadoop MapReduce Streaming ................. SUCCESS [10.957s]
[INFO] Apache Hadoop Distributed Copy .................... SUCCESS [32.407s]
[INFO] Apache Hadoop Archives ............................ SUCCESS [4.950s]
[INFO] Apache Hadoop Rumen ............................... SUCCESS [18.817s]
[INFO] Apache Hadoop Gridmix ............................. SUCCESS [10.909s]
[INFO] Apache Hadoop Data Join ........................... SUCCESS [6.662s]
[INFO] Apache Hadoop Extras .............................. SUCCESS [11.594s]
[INFO] Apache Hadoop Pipes ............................... SUCCESS [3.737s]
[INFO] Apache Hadoop Tools Dist .......................... SUCCESS [3.623s]
[INFO] Apache Hadoop Tools ............................... SUCCESS [0.127s]
[INFO] Apache Hadoop Distribution ........................ SUCCESS [2:55.243s]
[INFO] Apache Hadoop Client .............................. SUCCESS [25.929s]
[INFO] Apache Hadoop Mini-Cluster ........................ SUCCESS [2.516s]

1.新建的maven项目向来编写翻译的时候会报错:

1. Maven介绍

Apache Maven,是三个Java的连串管理及活动创设筑工程具,由Apache软件基金集会场馆提供。基于项目对象模型(缩写:POM)概念,Maven利用三个大旨音讯片断能管住一个品类的构建、报告和文书档案等步骤。曾是Jakarta项指标子项目,现为独立Apache项目。

maven的开辟者在她们支付网址上提议,maven的对象是要使得项目标创设特别便于,它把编译、打包、测量检验、发布等费用进程中的分化环节有机的串联了四起,并发生同样的、高水平的体系信息,使得项目成员可以立即地收获反映。maven有效地扶助了测量试验优先、持续集成,显示了鼓舞交换,及时申报的软件开拓观念。就算说Ant的复用是树立在”拷贝–粘贴”的基本功上的,那么Maven通过插件的建制完成了花色构建逻辑的真正复用。 

 

maven项指标创设生命周期(build lifecycle)由多数阶段组成:从validate到deploy。

[INFO]

[INFO] BUILD SUCCESS

 

开辟条件:

Win2008 64bit
Java-1.6.0_30
Maven-3.1.1
Hadoop-1.2.1

Eclipse Juno Service Release 2

 

maven插件中蕴藏goal。那么些goal能够被绑定到差异的maven的营造阶段上。goal表示二个一定的天职,是两个比创设阶段越来越细粒度的营造步骤,用于营造和管制当前项目。

[INFO]

[INFO] Total time: 33:38.762s
[INFO] Finished at: Sat Dec 28 21:59:12 CST 2013
[INFO] Final Memory: 68M/200M

[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

2. Maven安装(win)

1) 下载Maven:

下载最新的xxx-bin.zip文件,在win上解压到下载最新的xxx-bin.zip文件:

全球彩票平台 1

 

2) 设置遭遇变量

在win上解压到E:softwareshareapache-maven-3.1.1

并把maven/bin目录设置在情形变量PATH:

全球彩票平台 2

设置增添JAVA_HOME系变量:

全球彩票平台 3

3) 运转测验

下一场,展开命令行输入mvn,会看出mvn命令的周转效果

C:UsersAdministrator>MVN

[INFO]Scanning for projects...

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

[INFO]BUILD FAILURE

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

[INFO]Total time: 0.208s

[INFO]Finished at: Thu Dec 12 11:06:32 CST 2013

[INFO]Final Memory: 4M/490M

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

[ERROR]No goals have been specified for this build. You must specify a valid li

fecyclephase or a goal in the format <plugin-prefix>:<goal> or<plugin-group-id

>:<plugin-artifact-id>[:<plugin-version>]:<goal>.Available lifecycle phases are

:validate, initialize, generate-sources, process-sources, generate-resources, p

rocess-resources,compile, process-classes, generate-test-sources, process-test-

sources,generate-test-resources, process-test-resources, test-compile, process-

test-classes,test, prepare-package, package, pre-integration-test, integration-

test,post-integration-test, verify, install, deploy, pre-clean, clean, post-cle

an,pre-site, site, post-site, site-deploy. -> [Help 1]

[ERROR]

[ERROR]To see the full stack trace of the errors, re-run Maven with the -e swit

ch.

[ERROR]Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR]For more information about the errors and possible solutions, please rea

dthe following articles:

[ERROR][Help 1]

dException

 

4) 安装Eclipse的Maven插件:MavenIntegration for Eclipse

全球彩票平台 4

进入:

复制下载地址

到eclipse的help菜单-> Install New Software 举行安装

设置大概须求半多小时间的大运。(由于网络不平稳,试了三次才装成功)

 

全球彩票平台 5

 

全球彩票平台 6

 

全球彩票平台 7

5) Maven的Eclipse插件配置

菜单windows -> Preference

全球彩票平台 8

 

Maven 的详实介绍:请点这里
Maven 的下载地址:请点这里

在Maven堆栈中增添Oracle JDBC驱动

Maven 3.1.0 宣布,项目构建筑工程具

Linux 安装 Maven

Maven3.0 配置和精炼利用

Ubuntu下搭建sun-jdk和Maven2

Maven使用入门

  • 1
  • 2
  • 3
  • 4
  • 5
  • 下一页

...

要使用maven插件提供的goal,首先得通晓那几个插件提供了什么样goal以及她们的用法。

[INFO]

注:第3回运转,一般要下比非常多jar包

临时汇合世下载的时候下边那样的事物引起的第一次全国代表大会片错误

 Connection to refused

比方重新奉行

mvn package -Pdist,native -DskipTests -Dtar -e -X

就会随着下,一般是互联网难题。

Maven权威指南_普通话完整版清晰PDF

Linux 安装 Maven

Maven3.0 配置和总结利用

Ubuntu下搭建sun-jdk和Maven2

Maven使用入门

Maven编译Hadoop-2.2.0-src 1.环境 Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 23:22:22 0800) Maven home: /opt/maven Java...

 

maven的主干插件之一 --- help插件(Maven Help Plugin)能够用于查看插件提供了何等goal。

缓慢解决方案:新供给在pom文件中拉长:

以下是maven help插件的概述信息:

 

本文由全球彩票平台发布于全球彩票平台操作系统,转载请注明出处:【全球彩票平台】新建的maven项目直接用maven编译

TAG标签: 全球彩票平台
Ctrl+D 将本页面保存为书签,全面了解最新资讯,方便快捷。