HomeDownloadsUser GuideDevelopment

Development: Module

Module

This document describes how to add a new module to the build system.

Naming

Project module names should be names that are valid file names on all development platforms. Therefore please stick to the following pattern: [A-Za-z-], use - instead of spaces or underscores.

Module names must be unique in the whole build system regardless of their location. For example it is not possible to both have a module foo/test and bar/test since the build system could not distinguish between the two. Rather name them foo-test and bar-test.

Location

Basically a module can be stored whereever you like. However modules should be grouped by type, e.g. all example modules should be stored in the examples directory. Please take a look at the overall build structure and choose a suitable location.

The path of a module is not part of its identification. See the section about naming above for more information.

Directory Structure

The directory structure of each module is as follows:

TODO

Build System

In order to support a newly created module the build system has to be adjusted in several locations. This might be enhanced in a future release but for the moment new modules have to be integrated manually.

Module Build File

TODO

Versioning

All modules in the build system are versioned. To enable a module for versioning a new versioning section has to be added to the corresponding build files:

  1. Edit the documentation build file shared/build/doc.xml.
  2. Navigate to the build target doc.change.
  3. Copy an existing module section and adjust it according to your new module.

Here is what a sample section might look like for a module called mynewmodule (note that the path ${mynewmodule.path} has to be defined in the module build file):

<section
  name="examples-ejb" 
  type="version"
  module="mynewmodule"
  prefix="Version"
  buildfile="${project.dir}/${mynewmodule.path}/${project.module.version.file}"
/>

Once the module section information has been inserted the module versioning information itself is created using the standard build version command.

Main Build File

The main build file build.xml has to be adjusted to include the newly created module as follows: