Search code examples
javamavenninjaframework

How to install the first Ninja Web Framework application?


I am trying to install the very first Ninja Web Framework application that appears here, but I am getting failed tests errors. My java version is

$ 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)

and my Maven version is

$ 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"

The errors I received after typing mvn3 clean install are:

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

Any ideas about what is wrong and how can I solve it?


Solution

  • Should work without any issues. One thing that makes trouble is Maven 3.0. Can you try to use Maven 3.1 (or 3.2)? This should fix it.