當我在eclipse IDE中通過「run as」==>「Maven build」運行我的maven項目時,發生了什麼,顯示在img下面。 ! [在這裏輸入的形象描述] [1]Maven在嘗試執行「mvn build」命令時出現錯誤
我的JDK版本:1.7.0_76 Maven的版本是:3.3.1 回聲%JAVA_HOME%= d:\工作\的Java \ jdk1.7.0_76 回聲%M2_HOME%= D:\ work \ apache-maven-3.3.3 在我的Eclipse IDE中我的maven設置類似於img:![在這裏輸入圖片描述] [2]![3]
我的項目的構建路徑![在這裏輸入的形象描述] [4]
這是因爲這個項目是JDK1.6編譯的老項目,所以,我選擇安裝的JDK1.6。但是當作爲maven構建運行時,像圖片1這樣的錯誤發生了!
幫幫我吧!
The error is 【[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.084 s
[INFO] Finished at: 2015-07-11T01:15:18+08:00
[INFO] Final Memory: 5M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [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/NoGoalSpecifiedException
】