This topic is under construction for the 17.2 release of LabKey Server.

The LabKey Server module build process is designed to be flexible, consistent, and customizable. The process is driven by a manifest file that dictates which module directories to build. Module directories are listed either individually or using wildcards.

A few of the options this enables:

  • Modify your build manifest files 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 manifest file. See 'local_settings.gradle' below for an example.

settings.gradle

By default, the standard build tasks use the manifest file "/settings.gradle". You can edit this file to customize the modules that are built. settings.gradle includes a mix of wildcards and individually listed modules.

Wildcard Example. The following builds every module directory in "server/modules":

// The line below includes all modules in the server/modules directory (except the ones indicated as to be excluded)
BuildUtils.includeModules(this.settings, rootDir, [BuildUtils.SERVER_MODULES_DIR], excludedModules);

Individual Module Example. The following adds the 'workflow' module to the build.

// The line below is an example of how to include a single module
include ":server:optionalModules:workflow"

Custom Module Manifests

You can also create custom module manifest files. For example, the following manifest file 'local_settings.gradle' provides a list of individually named modules:

local_settings.gradle

include ':remoteapi:java'
include ':schemas'
include ':server:internal'
include ':server:api'
include ':server:bootstrap'
include ':server:modules:announcements'
include ':server:modules:audit'
include ':server:modules:core'
include ':server:modules:experiment'
include ':server:modules:filecontent'
include ':server:modules:pipeline'
include ':server:modules:query'
include ':server:modules:wiki'
include ':server:modules:bigiron'
include ':server:modules:dataintegration'
include ':server:modules:elisa'
include ':server:modules:elispotassay'
include ':server:modules:flow'
include ':server:modules:issues'
include ':server:modules:list'
include ':server:modules:luminex'
include ':server:modules:microarray'
include ':server:modules:ms1'
include ':server:modules:ms2'
include ':server:modules:nab'
include ':server:modules:search'
include ':server:modules:study'
include ':server:modules:survey'
include ':server:modules:visualization'
include ':server:customModules:targetedms'
include ':server:customModules:fcsexpress'

The following uses the custom manifest file in the build:

gradlew -c local_settings.gradle deployApp

Skipping a Module

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.

discussion

Discussion

Search 

Pages 

previousnext
 
expand all collapse all