使用hadoop编译安装2.2.0版本的源码编译,出现了很多问题
经过查找原因,适用于没有没有安装 protoc 2.5.0,在官网提示为:NOTE: You will need protoc 2.5.0 installed.
需要安装 protoc 2.5.0,他是google的一个数据缓冲高效可扩展的服务包,
下载地址为http://code.google.com/p/protobuf/downloads/list
上面有linux安装包和windows的,然后把protoc加入环境变量就可以了
- 导入问题,代码导入编译出错。
mvn eclipse: “Request to merge when ‘filtering’ is not identical.”
解决办法:
mvn
org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse
-DdownloadSources=true -DdownloadJavadocs=true
使用这个命令就可以了,原因可能是编译的时候maven-eclipse-plugin的版本不是2.6导致的。
还可以在pom.xml中配置
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.6</version>
</plugin>
</plugins>
</build>
这样你利用
mvn eclipse:eclipse也可以构建成功。
参考文档:
http://stackoverflow.com/questions/1397903/setting-project-for-eclipse-using-maven
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:[1.6,):run (execution: create-testdirs, phase: validate)
这个原因是因为编译hadoop的时候没有安装forrest导致,需要下载http://forrest.apache.org/,然后把forrest加入环境变量