0

我尝试按照文档mvn clean eclipse:eclipse error所述在ambari源代码下运行,但出现错误:

[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

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

4

2 回答 2

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

它会解决你的问题

于 2017-05-03T10:12:36.197 回答
1

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

cd ambari-metrics
mvn clean package -Dbuild-rpm -DskipTests
For Ubuntu:
cd ambari-metrics
mvn clean package -Dbuild-deb -DskipTests

您可以在 https://cwiki.apache.org/confluence/display/AMBARI/Ambari+Development中查看更多信息

于 2016-01-23T08:01:14.573 回答