This Confluence has been LDAP enabled, if you are an ASF Committer, please use your LDAP Credentials to login. Any problems file an INFRA jira ticket please.

Child pages
  • Coding Conventions

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: The line length of 120 is an exception to the Sun standard


The OFBiz project follows the Sun coding standards for Java source code. For information regarding this standard please visit

The line length of 120 is an exception to the Sun standard

Here is an example of a Java formatter for Eclipse

For Groovy we suggest you read but we don't expect people to follow all details there, still a good read..


In Eclipse, for Java, you may use Ctrl+I to be sure of correct indentation.

Files paths

titleBranches concerned

Only in trunk and R16.11 for now

  • Java
    The OFBiz project follows the Maven Standard Directory Layout to organise its Java files. At the moment of writing there are only a few unit tests (but a lot of what we so far call integration tests) so you will mostly find the ../src/main/java/org/apache/ofbiz.. path in components. As of today in few components in framework (base, entity, start, webapp) you will also find the ..src/test/java/org/apache/ofbiz.. path
  • Groovy
    We decided to use a groovyScripts sub-folder under components folders to put parsed Groovy scripts. We named it groovyScripts rather than script because other script languages could be used in the future
    Even if it's no used yet we reserved the groovy sub-folder under components folders for pre-compiled Groovy scripts. A distant goal is to replace Minilang by a Groovy DSL...
  • Freemarker
    The Freemarker templates are in template sub-folders under components folders
  • Minilang
    The Minilang map processors and minilang scripts are in minilang sub-folders under components folders


In OFBiz we don't set serialVersionUID but let the system handles that for us and rather use @SuppressWarnings("serial") where necessary.
More at and above.

Entity Definitions

Entity Names