我是Maven的新手。我正在尝试在安装在VM上的Ubuntu上安装Apache Zeppelin for Spark。为此,我需要在机器上安装JAVA和MAVEN。我运行了以下声明
sudo apt-get install maven
它成功运行了。我检查了版本(成功)
hduser@HDPMaster:/usr$ mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.19.0-43-generic", arch: "amd64", family: "unix"
以下命令给了我一个错误。
mvn install -DskipTests
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.216s
[INFO] Finished at: Tue Jan 12 09:35:15 PST 2016
[INFO] Final Memory: 6M/55M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/usr). Please verify you invoked Maven from the correct directory. -> [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/MissingProjectException
不确定这个POM文件是什么以及它位于何处。
任何输入都将受到赞赏
答案 0 :(得分:2)
您需要从zeppelin文件夹运行mvn install
。正如您在此处所见:https://github.com/apache/incubator-zeppelin,pom.xml IS位于项目根目录中。因此,只需从那里安装所有必需的依赖项cd incubator-zeppelin
和mvn install
。
答案 1 :(得分:0)
POM代表项目对象模型。因此,在任何Maven项目中,您都必须创建一个pom.xml文件,其中包含有关运行mvn install
时要执行的操作的所有详细信息。其中包括:
当您运行mvn install
时,maven需要一个pom.xml文件。或者换句话说,您始终必须从项目根位置运行命令。