The following directory structure follows the pattern for modules as they are checked into source control. The structure of the module as deployed to the server is somewhat different, for details see below and the topic Module Properties Reference. If your module contains Java code or Java Server Pages (JSPs), you will need to compile it before it can be deployed.
Items shown in lowercase are literal values that should be preserved in the directory structure; items shown in UPPERCASE should be replaced with values that reflect the nature of your project.
MODULE_NAME │ module.properties docs └──resources │ module.xml docs, example ├───assay docs ├───credits docs, example ├───domain-templates docs ├───etls docs ├───folderTypes docs ├───olap example ├───pipeline docs, example ├───queries docs │ └───SCHEMA_NAME │ │ QUERY_NAME.js docs, example │ │ QUERY_NAME.query.xml docs, example │ │ QUERY_NAME.sql example │ └───QUERY_NAME │ VIEW_NAME.qview.xml docs, example ├───reports docs │ └───schemas │ └───SCHEMA_NAME │ └───QUERY_NAME │ MyRScript.r example │ MyRScript.report.xml docs, example │ MyRScript.rhtml docs │ MyRScript.rmd docs ├───schemas docs │ │ SCHEMA_NAME.xml example │ └───dbscripts │ ├───postgresql │ │ SCHEMA_NAME-X.XX-Y.YY.sql example │ └───sqlserver │ SCHEMA_NAME-X.XX-Y.YY.sql example ├───scripts docs, example ├───views docs │ VIEW_NAME.html example │ VIEW_NAME.view.xml example │ TITLE.webpart.xml example └───web docs └───MODULE_NAME SomeImage.jpg somelib.lib.xml SomeScript.js example
If you are developing your module inside the LabKey Server source, use the following layout. The standard build targets will automatically assemble the directories for deployment. In particular, the standard build target makes the following changes to the module layout:
mymodule
├───module.properties
├───resources
│ ├───assay
│ ├───etls
│ ├───folderTypes
│ ├───queries
│ ├───reports
│ ├───schemas
│ ├───views
│ └───web
└───src (for modules with Java code)
The standard build targets transform the source directory structure above into the form below for deployment to Tomcat.
mymodule
├───assay
├───config
│ └───module.xml
├───etls
├───folderTypes
├───lib (holds compiled Java code)
├───queries
├───reports
├───schemas
├───views
└───web