2012-09-19 182 views
-2

我有我的電腦, 上安裝Apache Maven時,我不知道如何解決它的問題,任何人都可以建議找出如何解決問題的辦法,在此先感謝阿帕奇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 

回答

0

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

+0

謝謝,Jju :) –

1

首先之後你需要設置MAVEN_HOME然後set PATH=%MAVEN_HOME%\bin;%PATH% 設置JAVA_HOMEPATH=%JAVA_HOME%\bin;%PATH% 這是Maven配置的前提。

我假設你已經照顧過上面。

然後創建必須具有pom.xml並相應配置的maven項目。 轉到pom.xml所在的目錄並運行所需的配置

+0

是的,我已經解決了這個問題,謝謝Prasad;) –