您的位置:首页 > 其它

Ambari 2.6.1源码编译问题汇总

2018-03-01 11:13 1531 查看
1、[INFO] Ambari Admin View .................................. FAILURE
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (Bower install) on project ambari-admin: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (Bower install) on project ambari-admin: Command execution failed.
单独编译报错:
ECMDERR Failed to execute "git ls-remote --tags --heads https://github.com/twbs/bootstrap.git", exit code of #128

Additional error details:
fatal: unable to access 'https://github.com/twbs/bootstrap.git/': Peer reports incompatible or unsupported protocol version.

解决:个人将ambari-admin(包括子目录ambari-admin/src/main/resources/ui/admin-web)里面生成的node、node_modules、package-lock.json删除,保持干净的源码环境,再单独编译ambari-admin#cd ambari-admin/src/main/resources/ui/admin-web目录下,编辑 .bowerrc ,修改后的内容如下:{
    "directory": "app/bower_components",
    "allow_root": true
}
在上述目录下,安装npm依赖包,全局安装gulp、bower
#npm install
#npm install -g bower

#npm install -g gulp
安装bower的依赖包

bower install
(上述错误原因在于bower install命令失败,个人将之前成功编译的bower_components目录(ambari-admin/src/main/resources/ui/admin-web/app目录下)拷贝到ambari-release-2.6.1/ambari-admin/src/main/resources/ui/admin-web/app目录下,再次运行成功)

安装 gulp-webserver
npm install gulp-webserver --save-dev
运行命令mvn install -Drat.skip=true -Preplaceurl -X重新单独编译ambari-admin模块(此命令在ambari-admin目录下运行)
2、ambari-metrics编译时间过长,可修改pom.xml再进行编译(个人通过设置本地仓库下载,提高效率)如下面ambari/ambari-metrics目录下的pom.xml文件:



最终编译结果:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: