Hadoop 2.6 cdh 5.7编译问题

如题,出现了ivy-download问题,看报错信息是下载URL错误Getting: http://repo1.maven.org/maven2//org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar多了1个“/”。
我查看了源代码,发现mvnrepo=http://repo1.maven.org/maven2/ 
但是我在源代码中patches,ivysetting.xml , build.xml都把mvnrepo都给成了http://repo1.maven.org/maven2,去掉了最后的“/”
重新打包,然后再重新编译rpmbuild -ba hadoop.spec
编译到最后还是出现下列问题。
请教下老师,有没有遇到这种情况。
 
cd hadoop-mapreduce1-project
+ ant -Dreactor.repo=file:///home/rpmbuild/.m2/repository -Djdiff.stable=0.20.1 -Djdiff.build.dir=build/docs/jdiff-cloudera -propertyfile build.properties -Drepo.maven.org=http://repo1.maven.org/maven2/ -Dmvnrepo=http://repo1.maven.org/maven2/ -Dmvnrepo=http://repo1.maven.org/maven2/ -Drepo.maven.org=http://repo1.maven.org/maven2/ -propertyfile cloudera/build.properties api-report
Could not load property file build.properties: build.properties (No such file or directory)
Could not load property file cloudera/build.properties: cloudera/build.properties (No such file or directory)
Buildfile: build.xml
     [exec] [INFO] Scanning for projects...
     [exec] [INFO]                                                              
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] Building CDH Hadoop Maven Wrapper 2.6.0-mr1-cdh5.7.0
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO]
     [exec] [INFO] --- maven-remote-resources-plugin:1.0:process (default) @ hadoop-ant ---
     [exec] [INFO] Setting property: classpath.resource.loader.class => 'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
     [exec] [INFO] Setting property: velocimacro.messages.on => 'false'.
     [exec] [INFO] Setting property: resource.loader => 'classpath'.
     [exec] [INFO] Setting property: resource.manager.logwhenfound => 'false'.
     [exec] [INFO] inceptionYear not specified, defaulting to 2016
     [exec] [INFO]
     [exec] [INFO] --- maven-resources-plugin:2.7:copy-resources (copy-resources) @ hadoop-ant ---
     [exec] [INFO] Using 'UTF-8' encoding to copy filtered resources.
     [exec] [INFO] Copying 1 resource
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] BUILD SUCCESS
     [exec] [INFO] ------------------------------------------------------------------------
     [exec] [INFO] Total time: 4.492 s
     [exec] [INFO] Finished at: 2016-06-13T23:07:25+08:00
     [exec] [INFO] Final Memory: 13M/152M
     [exec] [INFO] ------------------------------------------------------------------------

ivy-download:
      [get] Getting: http://repo1.maven.org/maven2/ ... 0.jar
      [get] To: /home/rpmbuild/rpmbuild/BUILD/hadoop-2.6.0-cdh5.7.0/hadoop-mapreduce1-project/ivy/ivy-2.2.0.jar
      [get] Error opening connection java.io.FileNotFoundException: http://repo1.maven.org/maven2/ ... 0.jar
      [get] Error opening connection java.io.FileNotFoundException: http://repo1.maven.org/maven2/ ... 0.jar
      [get] Error opening connection java.io.FileNotFoundException: http://repo1.maven.org/maven2/ ... 0.jar
      [get] Can't get http://repo1.maven.org/maven2/ ... 0.jar to /home/rpmbuild/rpmbuild/BUILD/hadoop-2.6.0-cdh5.7.0/hadoop-mapreduce1-project/ivy/ivy-2.2.0.jar

BUILD FAILED
/home/rpmbuild/rpmbuild/BUILD/hadoop-2.6.0-cdh5.7.0/hadoop-mapreduce1-project/build.xml:1901: Can't get http://repo1.maven.org/maven2/ ... 0.jar to /home/rpmbuild/rpmbuild/BUILD/hadoop-2.6.0-cdh5.7.0/hadoop-mapreduce1-project/ivy/ivy-2.2.0.jar

Total time: 19 seconds
error: Bad exit status from /var/tmp/rpm-tmp.MRANRZ (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.MRANRZ (%build)

张伟

赞同来自:

问题解决了,在do-component-build文件中,有定义变量定义IVY_MIRROR_PROP=${IVY_MIRROR_PROP:-http://repo1.maven.org/maven2/},把最后的“/”去掉,再编译就可以了。

要回复问题请先登录注册