2014-05-19 63 views
0

我努力學習忍者框架在here忍者框架與Maven

構建RESTful Web服務安裝錯誤,我得到了以下錯誤,當我運行「命令mvn全新安裝」新創建的Maven項目文件夾內:

[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 4.610 s 
[INFO] Finished at: 2014-05-19T11:39:50-07:00 
[INFO] Final Memory: 11M/81M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ninja: Fatal error compiling: invalid target release: 1.7 -> [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/MojoExecutionException 

我在Mac小牛隊與Java 8,如果這件事。謝謝

+0

爲什麼男人?你爲什麼試圖通過忍者框架學習restfull webservices?春天還是運動衫是不夠的? –

回答

3

好吧,它可能聽起來很愚蠢,但我通過將JAVA_HOME添加到我的Mac上的路徑來解決該問題,否則,maven仍會在我的計算機上使用Java 1.6(我已安裝Java 1.8)。

export JAVA_HOME=$(/usr/libexec/java_home)