0

我正在尝试安装出现在这里的第一个 Ninja Web Framework 应用程序,但我收到了失败的测试错误。我的java版本是

$ java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

我的 Maven 版本是

$ mvn3 -version
Apache Maven 3.0.5 (r01de14724cdef164cd33c7c8c2fe155faf9602da; 2013-02-19 07:51:28-0600)
Maven home: /opt/local/share/java/maven3
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.9.5", arch: "x86_64", family: "mac"

我输入后收到的错误mvn3 clean install是:

Tests run: 4, Failures: 0, Errors: 4, Skipped: 0, Time elapsed: 5.696 sec <<< FAILURE!

Results :

Tests in error: 
  testGetIndex(controllers.ApiControllerDocTesterTest): java.lang.NullPointerException: Ninja injector cannot be generated. Please check log for further errors.
  testGetIndex(controllers.ApiControllerDocTesterTest)
  testGetHelloWorldJson(controllers.ApiControllerDocTesterTest): java.lang.NullPointerException: Ninja injector cannot be generated. Please check log for further errors.
  testGetHelloWorldJson(controllers.ApiControllerDocTesterTest)

Tests run: 4, Failures: 0, Errors: 4, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.261s
[INFO] Finished at: Fri Oct 10 13:22:47 CDT 2014
[INFO] Final Memory: 20M/125M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project ninja: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/gorayni/Development/ninja/target/surefire-reports for the individual test results.
[ERROR] -> [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/MojoFailureException

关于什么是错的以及如何解决它的任何想法?

4

1 回答 1

1

应该可以正常工作。造成麻烦的一件事是 Maven 3.0。您可以尝试使用 Maven 3.1(或 3.2)吗?这应该解决它。

于 2014-10-15T17:39:38.643 回答