mvn package的错误

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:08 min
[INFO] Finished at: 2016-11-24T11:35:44+08:00
[INFO] Final Memory: 20M/49M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process (default) on project hadoop-mapreduce-client-core: Execution default of goal org.apache.maven.plugins:maven-remote-resources-plugin:1.5:process failed: Plugin org.apache.maven.plugins:maven-remote-resources-plugin:1.5 or one of its dependencies could not be resolved: Could not find artifact org.apache.hadoop:hadoop-build-tools:jar:2.6.2 in chinahadoop.central (http://DX2:8081/nexus/content/repositories/central/) -> [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] http://cwiki.apache.org/conflu ... ption
这个报错是在org.apache.maven.plugins的配置上出错,但我对比了几个不同的pom.xml,并不清楚到底是应该怎么选?
比如有的是:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
还有的是:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
而我这个报错的pom.xml中是这样的:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
我应该怎么修改一下呢?

wangxiaolei

赞同来自:

这是在那个目录下执行的

zhudejun_1985 - 天下大事,必作于细

赞同来自:

zhumac1机器上: /root/hadoop/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core 我不明白这些很多不同的plugins都是干什么的?为何编译cdh的源代码可以,现在编译apache hadoop就不行了呢? 这两个的pom.xml文件也确实不同。

wangxiaolei

赞同来自:

这个会有问题,你先用cdh的编译源码。

fish - Hadooper

赞同来自:

你这编的是apache的hadoop?什么版本的?在什么目录下执行了什么命令?

fish - Hadooper

赞同来自:

将maven mirror去掉,直接使用公开的central,依然出现某些依赖包无法下载的问题。 看起来像某些依赖包被撤掉了导致的,还需要进一步排查才能知道具体原因是因为hadoop所依赖的某个老版本包被撤掉了或是其他原因。

要回复问题请先登录注册