Startseite / Plugin-Entwicklung / Entwicklung und Bereitstellung / Entwicklungsumgebung / Verzeichnisstruktur und Konfigurationsdateien

Directory Structure and Configuration Files

Although crafting the directory structure in which files used to build FirstSpirit Modules (FSM) are placed is, to a large extent, left to the developer, a certain format has proven to be quite useful to accommodate Java classes, unit test files and resources. The recommended directory structure and the accompanying files required to build an FSM file is described here; the Zip file containing the ContentCreator Example module source code reflects this layout.

Directory Structure

Schaubild Verzeichnisstruktur

The recommended directory structure used to organize the FirstSpirit Module "example_webedit"

The recommended directory structure enables organization of class, resource and configuration files as well as a separation of module code, test cases and additional data.

At the top level, the structure consists of three directories:

  • src
    contains all source code that implements plug-in components as well as test cases and can include the web application configuration and other resource files.
  • lib
    contains Java Archives (JAR files) that provide classes imported in this module's Java files. The directory lib itself will be added to the classpath during both compile and test runs; the subdirectory compile will be added to the classpath during compilation runs, while the subdirectory test will be present in the classpath only during test runs.
  • target
    will be created by targets in the Ant build file and contains processed output assembled during compilation and FSM assembly. The final product of this module--the FSM file, generated by running the Ant target "fsm"--will be placed in the directory target/fsm.

The src directory itself contains several subdirectories where files may be placed for various purposes:

  • impl
    contains all Java files organized by package namespace. Resources that are accessed by package name (e.g. resource bundles) should be placed here as well.
  • web
    contains configuration files and resources for the web-app component of this module. Subdirectories and their contents will be rolled out to the root directory of each project-specific ContentCreator web application that is configured to include this module.
    web-app components are required for proper roll-out of custom functionality to ContentCreator project web applications.

Important The ContentCreator Example module Zip file's src directory also contains another sub-directory, files. This directory is not used during module development but contains supporting files, such as Content Transport feature Zip files with workflow and script configurations that are required to use some of the example plug-ins the module provides. The files directory is not necessary and may be omitted in custom module directory structures.

Configuration Files

The configuration required to build and deploy an FSM is placed in three configuration files. The paths are given relative to the root of the module directory.

  • module.xml
    specifies basic information about the FirstSpirit Module itself and its individual components.
  • src/web/web.xml
    specifies settings for the web-app component of the FSM, used to support roll-out of functionality to ContentCreator users.
  • build.xml
    is the Ant configuration file that specifies targets used to build the FSM file.

© 2005 - 2024 Crownpeak Technology GmbH | Alle Rechte vorbehalten. | FirstSpirit 2024.12 | Datenschutz