有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

maven无法安装某些JAVA环境问题

我试图从github(https://github.com/cloudera/hue)安装hue

前4个步骤是

$ git clone http://github.com/cloudera/hue.git
$ cd hue
$ make apps
$ build/env/bin/hue runserver

在前两个步骤之后,当我尝试第三个步骤时,它引发了这个错误

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9:22.923s
[INFO] Finished at: Tue Jan 13 21:21:59 IST 2015
[INFO] Final Memory: 10M/68M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hue-plugins: Could not resolve dependencies for project com.cloudera.hue:hue-plugins:jar:3.7.0-SNAPSHOT: Could not find artifact jdk.tools:jdk.tools:jar:1.7 at specified path /usr/lib/jvm/java-7-openjdk-i386/jre/../lib/tools.jar -> [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 read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

请有人在这方面指导我好吗。提前谢谢


共 (1) 个答案

  1. # 1 楼答案

    该错误与Maven没有在本地回购协议或Maven central协议中找到依赖项有关,因此无法构建项目。由于该项目是一个Java项目,它假设您安装了Java-7-openjdk,而您似乎没有安装

    OpenJDK有一节介绍如何安装它

    然后,您应该能够运行构建

    如果安装后无法使用,请查找工具。jar文件,并使用

    mvn install:install-file -DgroupId=jdk.tools -DartifactId=jdk.tools -Dpackaging=jar -Dversion=1.7 -Dfile=tools.jar -DgeneratePom=true

    并从工具目录中运行命令。罐子是