MxBlog

Creating a Mendix MDA file using MxBuild

As mentioned in a previous post about continuous deployment with mendix, Mendix 5 includes a command line tool to generate a .mda file from your source code. You no longer need the Windows Modeler to pack a mendix application in to a deployable archive file. This enables you to completely automate deploying your application from your source code repository.

MxBuild.exe

The following illustrates how you can use it:

C:\users\ako\projects\mendix\OrderApp-main> & 'C:\Program Files (x86)\Mendix\5.3.2\modeler\mxbuild.exe' OrderApp.mpr --output=OrderApp.mda --java-exe-path='C:\Program Files\Java\jdk1.7.0_25\bin\java.exe'
   __  __      ____        _ _     _
  |  \/  |    |  _ \      (_) |   | |
  | \  / |_  _| |_) |_   _ _| | __| |
  | |\/| \ \/ /  _ <| | | | | |/ _` |
  | |  | |>  <| |_) | |_| | | | (_| |
  |_|  |_/_/\_\____/ \__,_|_|_|\__,_|
   v5.3.2
Initializing...
Starting build for Mendix Project file: C:\users\ako\projects\mendix\OrderApp-main\OrderApp.mpr
Output file: C:\users\ako\projects\mendix\OrderApp-main\OrderApp.mda
Reading project file...
Preparing project...
Building project...
Executing step 'Synchronize with file system'
 * Synchronizing with file system...
Executing step 'Prepare deployment'
 * Preparing deployment...
 * Preparing deployment...
Executing step 'Check prerequisites'
 * Checking for errors...
Executing step 'Clean deployment directory'
 * Cleaning deployment directory...
 * Cleaning deployment directory...
Executing step 'Build deployment structure'
 * Copying files...
 * Generating files...
 * Generating integration files...
 * Copying files...
 * Generating files...
 * Compressing files...

To find out more about MxBuild.exe, provide the --option parameter:

C:\users\ako\projects\mendix\OrderApp-main> & 'C:\Program Files (x86)\Mendix\5.3.2\modeler\mxbuild.exe' --help
   __  __      ____        _ _     _
  |  \/  |    |  _ \      (_) |   | |
  | \  / |_  _| |_) |_   _ _| | __| |
  | |\/| \ \/ /  _ <| | | | | |/ _` |
  | |  | |>  <| |_) | |_| | | | (_| |
  |_|  |_/_/\_\____/ \__,_|_|_|\__,_|
   v5.3.2
Usage: mxbuild [OPTIONS]+ FILENAME
Build Mendix Deployment Packages (.mda files) using the command-line.
The specified FILENAME is assumed to be a Mendix Project (.mpr) file
that is located inside a project directory.
Options:
  -h, --help                 show this message and exit.
  -o, --output=FILENAME      the FILENAME of the MDA file to create.
                               the default is 'out.mda' in the current
                               directory.
      --java-home=DIRECTORY  the Java home DIRECTORY that is used for running
                               Ant.
      --java-exe-path=FILENAME
                             the Java executable FILENAME that is used for
                               running Ant.
      --model-version=VERSION
                             the model VERSION that is embedded in the
                               deployment package.
      --model-description=DESCRIPTION
                             the model DESCRIPTION that is embedded in the
                               deployment package.
      --project-name=NAME    the project NAME that is registered in the
                               Mendix Runtime.
      --loose-version-check  use less strict version check, i.e., allow
                               conversion from earlier versions.     

MxBuild.exe requires .net, but can run on Mono, so you should be able to run this on Linux.