The LabKey Server module build process is designed to be flexible, consistent, and customizable. The process is driven by a manifest file that dictates the module directories to build; module directories are listed either individually or using wildcards. (For example, "server/modules/*" builds every module directory in "server/modules".)
By default, the standard build and rebuild ant targets use the manifest file "/server/standard.modules". You can edit this file to customize the modules that are built; you can also create custom .modules files and specify them to the build via the modulesFile parameter.
A few of the options this enables:
- Modify your local standard.modules file to remove modules that you never use, speeding up your build.
- Add your custom module directories to an existing build location (e.g., /server/modules) to automatically include them in the standard build.
- Create a custom .modules file (say, "mine.modules") with a list of just your custom module directories. Invoke "ant build -DmodulesFile=mine.modules" to build just your modules.
The standard module build process should be adequate for most custom modules. You can customize the module build process (e.g., to build custom dependencies) by creating a build.xml file in your module directory that defines a "build_module" target. The main build will invoke this target when your module directory is built. The core, query, flow, and wiki modules are examples that override the default process via custom build.xml files.
The standard targets build multiple modules in parallel, determining an appropriate number threads based on the number of processors on the machine. You can override the calculated thread count by setting the threadCount parameter.
The build targets can be made to ignore a module
if you copy a file named “skipBuild.txt” into the module’s top directory. The contents of the file are not important -- you can use an empty file. Existence of the file causes the build to skip that module.