Skip to main content

Version: 23.10

Build Form

The Maestro Offline Build (MOB) tool can be used to build an individual form within a project, when not all the forms are required. Similar to the Build Project Forms command, the MOB tool must be directed to a form’s folder on the local file system, either through an option, or by calling the command directly from the form’s folder.

A form folder can be defined as any folder that contains the form.json form definition file. For SCM-type projects, form.json resides in the folder with the form's normalised name, while for Standard projects, it is in the specific form version folder.

info

The form folder resides within the same project folder structure as created by the Clone Project command. The MOB tool traverses up the folder hierarchy to find project assets, and to look in the default release and organization library locations.

Synopsis

maestro build-form [ options ]

Options

All options are optional unless otherwise indicated.

info

Both short and long options are shown in the table below. When specifying a command, use either a short option or long option but not both.

OptionDescription
-l
--library-search
Library Search Path
A comma-separated list of paths on the local file system to search for release and organization libraries. For more information, see Build Project Forms.
-d
--form-dir
Form Path
The path to the Form Folder on the local file system.
If not provided, defaults to the current working folder.
-o
--output-dir
Output Path
The path on the local file system to place the built files.
If not provided, files are exported to the current working folder.
-t
--target-format
Target Format
The output format of the built forms.
Supported formats:
  • a: (Default) ZIP format form archive – one per form
  • f: FAR format form archive – one per form
  • e: Expanded FAR format – one folder created per form
To learn more about output formats, see Output formats.
-b
--brands
Brands
A comma-separated list of brand names to build. If the form uses a multi-branded template, specific brands can be built in a single invocation. Separate assets will be produced.
Enclose the value in quotes if any brand names have spaces in them.
-a
--all-brands
(Flag) All Brands
Build all brands (only applicable for forms using a multi-branded template). If this option is set, the Brands option is ignored.
-c
--version-config
Version Configuration Path
The path to a custom form-version-config.xml file. This is relevant for the ZIP output format only. For more information about this option, see About the Version Configuration Path below.
-f
--force-overwrite
(Flag) Force Overwrite
Indicate that any existing contents in the output folder may be overwritten.
If not provided and the folder is not empty, an error is displayed.
-x
--transact-functions
(Flag) Transact Functions
Build the form using server-side Transact Functions. If not specified, the build option set in the Maestro UI is used.
--debug(Flag) Debug Mode
Build the form in un-minified mode for debugging.
Do not set this option for Production forms.

About the Version Configuration Path

When building a form to a ZIP form archive, the ZIP file will contain a file called form-version-config.xml which contains settings for many of the configurable options available in Journey Manager once a form has been imported. By default, the MOB tool includes a version of this file with the most common settings. However, you may want to preset some settings, allowing the imported form to adopt alternative settings.

The Version Configuration Path option allows you to direct the MOB tool to a custom copy of the form-version-config.xml file, which is added to the ZIP file instead of the default form-version-config.xml file.

The value passed to this option is the full path including the filename. For example:

C:\forms\my-form\form-version-config.xml

Examples

  • Build the form in the current form folder, using the default options (ZIP format, output to the current folder) and the release and org libraries in the current folder.

    maestro build-form
  • Build the form in a specified folder (in an SCM project), in a FAR format, outputting to a specified folder.

    maestro build-form -d C:\my-scm-project\forms\my-first-form -o C:\builds\my-first-form -t f
  • Build version 2.0.0 of the specified form that resides in a Standard project.

    maestro build-form -d C:\my-standard-project\forms\my-second-form\2.0.0
  • Build the form in the current folder, using a custom form version configuration.

    maestro build-form -c C:\forms\my-form\form-version-config.xml
  • Build the form in the current folder, building two brands.

    maestro build-form -b "Brand A, Brand B"