Skip to content

Commit dde3a36

Browse files
committed
Add MxBuild options
Add required flags and options for portable app package deployment in MxBuild
1 parent a7a5f27 commit dde3a36

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

content/en/docs/refguide/general/mxbuild.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Command-line options are described in the table below:
6868
| `-h`, `--help` | Prints a short description of the MxBuild and a list of all available options. |
6969
| `--java-home=DIRECTORY` | (Required). The directory in which the JDK is installed.<br/>For example, `--java-home=/usr/lib/jvm/java-8-oracle`.<br/>For Windows, *DIRECTORY* should be enclosed in double-quotes `"`. |
7070
| `--java-exe-path=FILENAME` | (Required). The full path to the Java executable.<br/>For example, `--java-exe-path=/usr/lib/jvm/java-8-oracle/bin/java`.<br/>For Windows, *DIRECTORY* should be enclosed in double-quotes `"` and must contain the complete file name `...\java.exe`. |
71-
| <code>––target=[package&#124;deploy]</code> | `package`: default if option is omitted; creates a deployment package (*.mda file*).<br/>`deploy`: deploys the app without making a deployment package.<br/>`sbom`: generates a [Software Bill of Materials](/refguide/sbom-generation/) (SBOM) in the CycloneDX format for the app. |
71+
| <code>––target=[package&#124;deploy&#124;sbom&#124;portable-app-package]</code> | `package`: default if option is omitted; creates a deployment package (*.mda file*).<br/>`deploy`: deploys the app without making a deployment package.<br/>`sbom`: generates a [Software Bill of Materials](/refguide/sbom-generation/) (SBOM) in the CycloneDX format for the app. <br/> `portable-app-package`: generates portable app deployment zip file with components and configurations required to run the application.|
7272
| `--loose-version-check` | Creates a deployment package from an app which was created with a lower Mendix version.<br/>The app will be upgraded to the MxBuild version before the deployment package is created.<br /> Any changes included as a result of this upgrade will not be stored in your app. |
7373
| `--write-errors=FILENAME` | Writes all errors, warnings, and deprecations encountered during deployment of the app to the specified file in JSON format.<br />This file is only written when the app contains errors.<br />If the file already exists, it will be overwritten without a warning.<br />For a description of the format of this file, see the [App Errors](#app-errors) section below. |
7474
| `--generate-sbom` | Generates a Software Bill of Materials (SBOM) file as a part of the `package` and `deployment` targets. The SBOM will be included in the deployment package if this option is used and is saved under its default location: `deployment\sbom.json` |
@@ -115,6 +115,22 @@ For example, to create a SBOM in the deployment directory of the App with the na
115115
mxbuild --target=sbom --java-home="C:\Program Files\Java\jdk1.8.0_144" --java-exe-path="C:\Program Files\Java\jdk1.8.0_144\bin\java.exe" "C:\Users\username\Documents\Mendix\MyApp\MyApp.mpr"
116116
```
117117

118+
### Options When Creating Portable App Package
119+
{{% alert color="info" %}}
120+
The following options are only applicable with the `--target=portable-app-package` option:
121+
{{% /alert %}}
122+
123+
| Option | Description |
124+
| --- | --- |
125+
| `--export-secrets` | Emits passwords and private constants to the configuration files. |
126+
| `-o FILENAME` or<br/>`--output=FILENAME` | The name (with optional relative or absolute path) of the portable app deployment zip file. The extension of the file must be `.zip`. This option is mandatory.|
127+
128+
For example, to create a portable app deployment zip file in the target directory of the App with the name `MyApp_PAD.zip` using the app `MyApp` using the Windows version of MxBuild, you can use the following command:
129+
130+
```bat
131+
mxbuild --target=portable-app-package --java-home="C:\Program Files\Java\jdk1.8.0_144" --java-exe-path="C:\Program Files\Java\jdk1.8.0_144\bin\java.exe" -o "C:\Users\username\Documents\Mendix\MyApp\MyApp_PAD.zip" "C:\Users\username\Documents\Mendix\MyApp\MyApp.mpr"
132+
```
133+
118134
## Return Code
119135

120136
When MxBuild exits, one of the following codes will be returned:

0 commit comments

Comments
 (0)