By default, running ant build creates a development build. It creates the minimum number of build artifacts required to run LabKey Server on a development machine. Some of these artifacts aren't required to run LabKey Server (such as pre-creating a .gz version of resources like .js files so the web server doesn't need to dynamically compress files for faster download), and others can be used directly from the source directories when the server is run in development mode (via the -DdevMode=true JVM argument). This means the development builds are faster and smaller than they would otherwise be.

Note that individual modules built in development mode will not deploy to a production server. On deployment, the server will show the error: "Module <module-name>...was not compiled in production mode". You can correct this by running 'ant production' or, to build an individual module in production mode, you can add the following line to the file.

BuildType: Production

Production servers do not have access to the source directories, and should be optimized by performance, so they require that all resources be packaged each module's build artifacts. This can be created by running ant production instead. If you have existing build artifacts on your system, you will need to do an ant clean first so that the build recognizes that it can't use existing .module files.

All standard LabKey Server installers (the Windows .exe installer, and the .zip and .tar.gz downloads) are compiled in production mode.

Related Topics





expand all collapse all