ambari:mvn clean eclipse:eclipse

时间:2015-09-02 02:51:35

标签: maven ambari

我尝试在mvn clean eclipse:eclipse error源代码下运行ambaridocument说, 但有错误:

[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

我不知道如何解决这个错误,
我试着谷歌搜索没有答案
请给我一些建议 谢谢

2 个答案:

答案 0 :(得分:1)

您的Ambari指标尚未构建。 如果您计划安装Ambari Metrics服务,则还需要构建Ambari Metrics项目。

&#13;
&#13;
cd ambari-metrics
mvn clean package -Dbuild-rpm -DskipTests
For Ubuntu:
cd ambari-metrics
mvn clean package -Dbuild-deb -DskipTests
&#13;
&#13;
&#13;

你可以看到更多 https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development

答案 1 :(得分:1)

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

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

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

本地存储库&gt;中央存储库&gt;远程存储库。

Maven搜索依赖项,但未找到本地,中央和远程的依赖项。

所以第一个maven建立了ambari。在构建项目之后,将依赖jar保留在本地存储库中。

mvn clean install

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

然后你申请

mvn clean eclipse:eclipse

它将解决您的问题