Module directory structure

Maven2 directories

Jahia Modules use Maven 2 directory structure (see Maven Standard Directory Layout)

src 
| + main 
| + java 
| + resources 
| + webapps 
| + site

Jahia module directory

Jahia directory is structured as this:

webapps 
| + javascript - contains all javascripts for the module 
| + css - contains all css for the module 
| + resources - contains all resources for the module
| + icons - contains all icons for the module content definitions 
| + META-INF 
     | + spring - Spring XML files 
| - definitions.cnd - definitions for the module 
| - rules.drl - module rules 
| - import.xml - content imported when the module is loaded the first time

Notes

  • icons naming:
    • Use the name of the definition replacing ":" by "_".
    • Use png format example: jnt:news needs jnt_news.png icon
  • resources name:
    • From the pom.xml file, get the module name (in name/ tag) and remove spaces
    • Example: for role module, its name is Jahia Roles, its resource files will be named JahiaRoles.properties