-2

我在我的计算机上安装 apache maven 时遇到问题,我不知道如何解决它,任何人都可以提出一些解决问题的方法,在此先感谢

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.172s
[INFO] Finished at: Wed Sep 19 13:00:13 MSK 2012
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\Documents and Settings\Saken). 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 swit
ch.
[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/MissingProject
Exception
4

2 回答 2

1

首先你需要设置MAVEN_HOME然后set PATH=%MAVEN_HOME%\bin;%PATH% 设置JAVA_HOMEPATH=%JAVA_HOME%\bin;%PATH% 这是 maven 配置的先决条件。

我假设你已经处理了上面的问题。

然后创建必须有 pom.xml 的 maven 项目并进行相应的配置。转到 pom.xml 所在的目录并运行所需的配置

于 2012-09-22T19:32:27.827 回答
0

Maven 需要pom.xml工作目录中的配置文件。运行cd c:/path/to/your/project/folder和运行后mvn <needed goals>

于 2012-09-19T08:37:30.563 回答