Sans Pareil Technologies, Inc.

Key To Your Business

Config Directory

The config directory contains all configuration files and classpath resources that are used to build the custom module. The screen capture shows the top-level contents of this directory.


This is a custom ivy configuration file. We need a custom file to indicate the location of the Magnolia maven2 compatible repository from which the Magnolia dependencies are to be downloaded.


This is the JackRabbit repository configuration file that is used when we configure Magnolia. We prefer to use the H2 database instead of the pre-configured Derby/MySQL databases as the underlying datastore for JackRabbit. We add this file to the Magnolia web archive when we build Magnolia from the downloaded war file.


This is the standard JackRabbit repository configuration file that we use when we import our data into a stand-alone JackRabbit repository. We prefer to develop and unit test our data importers, repository and other DAO classes against a stand-alone JackRabbit repository rather than tying ourselves too heavily into Magnolia. We use standard JCR XML exports to bootstrap our module with the data imported into the standard repository.


The Magnolia standard module configuration file. The file that is used to indicate the workspace that our module uses, the servlets included in our module as well as dependencies on other magnolia modules. The dependency list influences the order in which modules are installed on initial software installation.


The resources directory contain the standard directories that are included in the module jar file. Contents in this directory are used to install/update required resources, nodes etc. on module install or update. The screen capture shows the structure of this directory.

Magnolia modules are a combination of Java classes, resources such as CSS/images/html pages, and configuration for these resources in the JCR repository. Each module contains mandatory metadata that must be packaged under a standard directory structure within the module jar file.

  • mgnl-bootstrap/books - Place all XML export files that configure our module at this level. These relate to administrative menu screens.
  • mgnl-bootstrap-samples/books - Place all XML export files that constitute initial data to be imported into the repository for use by our module. This may be data brought in from other data sources like databases into a JCR repository and then exported.
  • mgnl-files/docroot/books - Place images or other resources that may be referenced via /docroot/books/ from templates or other content pages. We placed additional jQuery libraries etc. that we need for most of our pages.
  • mgnl-resources/books/ - Root directory for static resources that are loaded from the module classpath. Available from magnolia templates through the ${contextPath}/.resources tree. Note that we do not use this directory at present. We moved all the content from this location to the resources workspace, allowing users to manage the content through the admin interface.