2015-09-02 78 views
0

我尝试为document说下ambari源代码运行mvn clean eclipse:eclipse error, 但随着错误:ambari:MVN清洁日食:日食

[INFO] ------------------------------------------------------------------------ 
[INFO] Reactor Summary: 
[INFO] 
[INFO] Ambari Main ........................................ SUCCESS [ 28.207 s] 
[INFO] Apache Ambari Project POM .......................... SUCCESS [ 0.025 s] 
[INFO] Ambari Web ......................................... SUCCESS [ 5.298 s] 
[INFO] Ambari Views ....................................... SUCCESS [ 5.082 s] 
[INFO] Ambari Admin View .................................. SUCCESS [03:43 min] 
[INFO] ambari-metrics ..................................... SUCCESS [ 6.007 s] 
[INFO] Ambari Metrics Common .............................. SUCCESS [ 2.274 s] 
[INFO] Ambari Metrics Hadoop Sink ......................... SUCCESS [ 2.843 s] 
[INFO] Ambari Metrics Flume Sink .......................... SUCCESS [ 1.166 s] 
[INFO] Ambari Metrics Kafka Sink .......................... SUCCESS [ 0.229 s] 
[INFO] Ambari Metrics Storm Sink .......................... SUCCESS [ 1.261 s] 
[INFO] Ambari Metrics Collector ........................... FAILURE [ 11.478 s] 
[INFO] Ambari Metrics Monitor ............................. SKIPPED 
[INFO] Ambari Metrics Assembly ............................ SKIPPED 
[INFO] Ambari Server ...................................... SKIPPED 
[INFO] Ambari Agent ....................................... SKIPPED 
[INFO] Ambari Client ...................................... SKIPPED 
[INFO] Ambari Python Client ............................... SKIPPED 
[INFO] Ambari Groovy Client ............................... SKIPPED 
[INFO] Ambari Shell ....................................... SKIPPED 
[INFO] Ambari Python Shell ................................ SKIPPED 
[INFO] Ambari Groovy Shell ................................ SKIPPED 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 05:20 min 
[INFO] Finished at: 2015-09-02T10:33:57+08:00 
[INFO] Final Memory: 37M/141M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal on project ambari-metrics-timelineservice:Could not resolve dependencies for project org.apache.ambari:ambari-metrics-timelineservice:jar:2.0.0-SNAPSHOT: Could not find artifact org.apache.ambari:ambari-metrics-common:jar:2.0.0-SNAPSHOT in apache-hadoop (http://repo.hortonworks.com/content/groups/public/) -> [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 rea                      d the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso                      lutionException 
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command 
[ERROR] mvn <goals> -rf :ambari-metrics-timelineservice 

我不知道如何解决这个错误,
我试图用无人接听
google搜索请给我一些建议
感谢

+1

你检查链接ambari构建过程提供当它通过错误,它有几个可能的解决方案:https://开头cwiki .apache.org/confluence/display/MAVEN/DependencyResolutionException – cjackson

回答

1

这是一个依赖问题。 Maven存储库是包含pom.xml文件的打包JAR文件的目录。 Maven在存储库中搜索依赖关系。有3种类型Maven仓库:

1.Local Repository 
2.Central Repository 
3.Remote Repository 

Maven的搜索按以下顺序依赖:

本地资源库>中央存储库>远程仓库。

Maven搜索依赖关系,并没有发现依赖到本地,中央和远程。

所以首先maven构建ambari。 Maven构建项目之后,将依赖项jar保存到本地存储库中。

mvn clean install 

它将打包jar并保存在本地存储库中。

然后你申请

mvn clean eclipse:eclipse 

这将解决您的问题

+0

谢谢!这是我正在寻找的。像魅力一样工作 –