1. 程式人生 > >eclipse部署ambari原始碼中出現的錯誤

eclipse部署ambari原始碼中出現的錯誤

問題1:[ERROR] Failed to execute goal on project ambari-server: Could not resolve depen
dencies for project org.apache.ambari:ambari-server:jar:1.3.0-SNAPSHOT: Failure
to find org.apache.ambari:ambari-views:jar:1.3.0-SNAPSHOT in http://maven.oschin
a.net/content/groups/public/ was cached in the local repository, resolution will

 not be reattempted until the update interval of nexus-osc has elapsed or update

解決辦法:找到本地庫中的.lastupdated檔案(我的本地庫為D:\WorkSpace\Maven\)

集體路徑:將D:\WorkSpace\Maven\org\apache\ambari資料夾下(包含所屬檔案)的.lastupdated檔案重新命名,命名方法:去掉.lastupdated字尾名

問題2:[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:


run (compile) on project ambari-web: An Ant BuildException has occured: Execute
failed: java.io.IOException: Cannot run program "npm" (in directory "D:\hadoop\w
orkspace\ambari-1.6.1\ambari-web"): CreateProcess error=2, ?????????
[ERROR] around Ant part ...<exec dir="D:\hadoop\workspace\ambari-1.6.1\ambari-we

b" executable="npm">... @ 4:76 in D:\hadoop\workspace\ambari-1.6.1\ambari-web\ta
rget\antrun\build-ambari-web-compile.xml

解決辦法:修改ambari-web的pom.xml檔案

將  <exec dir="${basedir}" executable="npm“>
                  <env key="PYTHON" value="${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap" />
                  <arg value="install"/>
                </exec>

修改為:  <exec dir="${basedir}" executable="C:\Program Files\nodejs\npm.cmd" failonerror="true">
                  <env key="PYTHON" value="${project.basedir}/../ambari-common/src/main/unix/ambari-python-wrap" />
                  <arg value="install"/>
                </exec>