Ninja框架使用Maven安装错误

时间:2014-05-19 17:42:48

标签: java maven ninjaframework

我正在尝试学习用于在here

构建RESTful Web服务的Ninja框架

当我在新创建的maven项目文件夹中运行“mvn clean install”时出现以下错误:

[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

如果这很重要,我会使用Java 8在Mac Mavericks上。感谢

1 个答案:

答案 0 :(得分:3)

好吧,这可能听起来很愚蠢,但我通过在我的Mac上的路径中添加JAVA_HOME来解决问题,否则,maven仍在我的计算机上使用Java 1.6(我已经安装了Java 1.8)。

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