Fork me on GitHub


Great you want to contribute!

It’s really simple. Well. There are some rules that you should follow:


The process is mostly automated and convenient.


  • Make sure you are following the code style below.
  • Make sure your feature is well tested.
  • Make sure your feature is well documented (Javadoc).
  • Make sure there is documentation for your feature at ninja-core/src/site/markdown.
  • Make sure your feature runs inside ninja-integration-test or ninja-servlet-jpa-blog-integration-test if you wrote a feature related to JPA.
  • Add your changes to and your name to

Sign the contributor agreement (electronically) and send us a pull request to become a happy member of the Ninja family :)

Code style

  • Don’t use null – This is not yet the case across the whole codebase. – For new code the rule of thumb is: Never use null. Consider using Optional instead. – More:
  • Make things immutable (ImmutableMap etc) – This is not yet the case across the whole codebase. – New code should use immutability where possible. – Makes it easy to reason about state of variables and makes multithreading a breeze.
  • New tests should use AssertJ (and no longer hamcrest or Junit equals). – AssertJ makes tests easier to read and understand + it gives better error messages
  • Consider using the builder pattern – Constructors with many parameters are hard to read. A builder can help. – A builder has to work like MyNewClass.builder(). … .build(). (Notice the static builder() - no “new” is needed).
  • Default Sun Java / Eclipse code style (a default config for eclipse can be found at the project root eclipse-ninja-format.xml.
  • If you change only tiny things only reformat stuff you actually changed. Otherwise reviewing is really hard.
  • We use spaces / 4 spaces as a tab in all files (java, xml…).
  • Files in git repo should have unix (LF) file endings. We are using the .gitattributes file to handle that for you.
  • All files are UTF-8.


Making a Ninja release

1) Preparations

  • Make sure you are using for versioning.
  • Make sure is updated
  • Make sure upgrade-guide top version is updated
  • Make sure the archetypes are up-to-date (Ninja version must match release version)
  • Make sure the archetypes version in docu (JPA + getting_started) matches release version

2) Release to central maven repo

Make sure you got the credentials properly set up in your .m2/settings.xml:

    <username>sonatype username</username>
    <password>sonatype password</password>

3) Publish website

Make sure you got the credentials properly set up in your .m2/settings.xml:

  • git checkout TAG
  • cd ninja-core
  • mvn site site:deploy

And back to develop:

  • git checkout develop