window10下编译hadoop报错:Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:

来源:互联网 发布:网狐6603源码 网盘 编辑:程序博客网 时间:2024/06/08 04:16

Windows10 下build hadoop2.7.3

报错:Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (dist) on project hadoop-hdfs-httpfs: An Ant BuildException has occured: Can't get http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz to E:\hadoop-2.7.3-src\hadoop-hdfs-project\hadoop-hdfs-httpfs\downloads\apache-tomcat-6.0.44.tar.gz[ERROR] around Ant part ...<get dest="downloads/apache-tomcat-6.0.36.tar.gz" skipexisting="true" verbose="true" src="http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.36/bin/apache-tomcat-6.0.44.tar.gz"/>... @ 5:182 in E:\hadoop-2.7.3-src\hadoop-hdfs-project\hadoop-hdfs-httpfs\target\antrun\build-main.xml[ERROR] -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (dist) on project hadoop-hdfs-httpfs: An Ant BuildException has occured: Can't get http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz to E:\hadoop-2.7.3-src\hadoop-hdfs-project\hadoop-hdfs-httpfs\downloads\apache-tomcat-6.0.44.tar.gzaround Ant part ...<get dest="downloads/apache-tomcat-6.0.44.tar.gz" skipexisting="true" verbose="true" src="http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz"/>... @ 5:182 in E:\hadoop-2.7.3-src\hadoop-hdfs-project\hadoop-hdfs-httpfs\target\antrun\build-main.xml

这个报错其实很简单的就是MAVEN无法下载tomcat的tar包,maven的镜像地址也修改过为aliyun的可是每次build到这里的时候都会报错,无法直接下载。所以我们采用手动下载tar包 。

1、找到源码包目录如下路径,两个路径都会进行tomcat下载。

E:\hadoop-2.7.3-src\hadoop-hdfs-project\hadoop-hdfs-httpfs\target\antrun\E:\hadoop-2.7.3-src\hadoop-common-project\hadoop-kms\target\antrun

2、打开build-main.xml,找到第五行,复制src=“ ”内地址到浏览器进行手动下载,并将其分别放到如下目录,如没有downloads,手动创建

E:\hadoop-2.7.3-src\hadoop-hdfs-project\hadoop-hdfs-httpfs\downloadsE:\hadoop-2.7.3-src\hadoop-common-project\hadoop-kms\downloads

如果真的URL下载地址很慢,也可以自己去官网下载对应版本的tomcat放在该目录,保持和文件内dest=”downloads/apache-tomcat-6.0.44.tar.gz” 内容一致。

 <get dest="downloads/apache-tomcat-6.0.44.tar.gz" skipexisting="true" verbose="true" src="http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.44/bin/apache-tomcat-6.0.44.tar.gz"/>

3、在删除该行 标签,并保存,让他不再从网上下载,而继续执行其他命令;
4、打开命令行重新进行编译即可。

阅读全文
0 0
原创粉丝点击