Development Guidelines

Coding Standards
OpenLegacy contains a ready eclipse preference file, which apply our coding standards. Make sure you import the file /openlegacy/eclipse-openlegacy-prefs.epf into your workspace

Most OpenLegacy functionality is covered by JUnit tests. Most tests rely on Spring JUnit framework, and uses a common/specific spring xml context file. Specific context files typically points to specific beans and resources which the tests check. Every commit to github master is tested under a continuous integration server at:

Working With GIT
OpenLegacy is stored at and developers should use EGit eclipse plug-in (built into Eclipse STS, the recommended IDE).

EGit provides a “git staging” view which should be used to determine what files are about to be committed. Drag the files from the “Unstaged changes” to “Staged changes”.

Each commit should be covered by a ticket at: (We plan to migrate to JIRA later on).

GIT uses a push/pull from, so make sure you pull changes before a commit, and push your changes afterwards. Commits are not sent to github automatically (if this is the first time you are using git source control).

Feature branches should be created when working on a task which requires a few working days/ large number of commits, or incomplete work sharing with other developers.
(right click on project -> Team -> Switch to -> New Branch…)

Only once a task is completed should it be merged to master branch, and push to github.
It is OK to push to a feature branch to github. (right click on project -> Team -> push to upstream). Note that only completed tasks should be merged to master branch.

Commits must refer to a ticket in github (JIRA later): refers #XXX … or fixes #XXX …
Commit comment should reflect the technical solution of the problem.

GIT Tips & Tricks
If you are working in Windows and using EGit within eclipse STS, you may find the following commands required, as white spaces tend to cause white space diffs, and show a large number of file changes:…ile-as-changed

All OpenLegacy code is built using Maven. The development environment contains many launchers (*.launch files) which is used for tasks not covered by the IDE.

When working on OpenLegacy Web application (openlegacy-mvc-new, etc.), and modifying OL Java projects, it is required to run “Run As -> Maven install” to build and install a JAR of the relevant project into Maven local repository.

You may want to use “Run as -> Maven build…”, Goal: install, skip test -> checked, to disable local tests execution.