First off thanks for your interest in improving JBake! We appreciate you taking the time to contribute to JBake and to ensure that your contribution is easy to review and process we kindly ask that you follow the guidance outlined below.
By contributing changes to this repository, you agree to license your contributions under the MIT license. This ensures your contributions have the same license as the project and that the community is free to use your contributions. You also assert that you are the original author of the work that you are contributing unless otherwise stated.
We use the issue tracker on GitHub associated with this project to track bugs and features. Before submitting a bug report or feature request, check to make sure it hasn’t already been submitted. When submitting a bug report, please include a Gist that includes any details that may help reproduce the bug, including your local environment details (i.e. installation method, JVM version, and Operating System).
Most importantly, since JBake is a static site generator, reproducing most bugs requires that we have some snippet of content on which triggers the bad behaviour in JBake.
Prior to starting work on a Pull Request please post a message on the developers mailing list outlining the new feature or bug you are planning to work on. You can then be advised if anyone else is already working on the same topic or if there is any pertinent information that you should be made aware of such as upcoming structural or API changes.
Once you’re ready to start work on your pull request follow the steps outlined below.
-
Add tests for your unimplemented feature or bug fix. (See Writing and Executing Tests)
-
Implement your feature or bug fix.
-
Run
mvn test
to run the tests. If your tests fail, return to step 4. -
Add, commit, and push your changes.
For ideas about how to use pull requests, see the post Useful GitHub Patterns.
Tests and their resources reside within /src/test
and should be written using the JUnit framework, you also have the
following testing libraries available to you when writing your tests:
Any resources, such as templates, that your tests require should be placed within /src/test/resources
.
To execute the tests from the command line you will require Maven to be installed, once you have Maven installed you can execute the following command from the root folder in the repository:
$ mvn test
You will be able to run the unit tests in most IDE’s such as Eclipse as well.
If you would like to utilise another testing library in your test classes, then please mention this and your reasons for use when posting on the developers mailing list about your planned contribution.
If you would like to use a different testing framework instead of JUnit you may volunteer to convert the existing test suite over to the new framework, we’d prefer not to have multiple test suites in different frameworks.
At present JBake supports Java 6 and above and any contributions shouldn’t use Java 7 or Java 8 syntax, please see the roadmap for when support for Java 7 & 8 is planned.
You could add mockito to the list of testing libraries.
How about some code style guidelines?