push

This command replaces the previous mfp build, mfp deploy, and mfp bd commands. Prepares and transfers the relevant assets to either a local or remote MobileFirst Server. These assets can either be native app registration, hybrid app registration, or Cordova app registration. These assets also include web content for either direct update or the deployment of adapters.

Syntax

mfp push [<server>] [<runtime>] [--password|-p <password>] [--minify|-m] [--concatenate|-c] [--nosend|-n]

Parameters

<server>
Name of predefined server to push to. This parameter is optional, and the default server is used if you do not provide this parameter. For a list of defined servers, run mfp server info. Define new servers by running mfp server add.
<runtime>
Runtime of your back-end project running on the server.
  • If this value is not specified and the mfp push command was previously run for this application, the command uses the runtime value from the last time mfp pushwas run.
  • If this value is not specified and this is the first time mfp push is run for this application, the runtime value is obtained from the server:
    • if there is a single runtime on the server, it is used.
    • if there are multiple runtimes, you are prompted to select a runtime.
    • if there are no runtimes on the server, the command exits with an error.
  • If the mfp push command is run from within a MobileFirst project folder, the runtime value must exactly match the project runtime name; otherwise the command exits with an error.
--password|-p <password>
The password for the admin login ID. If you do not supply this parameter and it is not in server configuration, you are prompted for the admin password on all server management tasks.
--minify|-m
Enables minification of web assets for hybrid apps. By default, no minification is performed during a hybrid app push.
--concatenate|-c
Enables concatenation of web assets for hybrid apps. By default, no concatenation is performed during a hybrid app push.
--nosend|-n

Prevents the deployment of artifacts to the target server. You can use this in automated build environments where the build and deployment steps are isolated.

The following actions are taken:
  • MobileFirst Project:
    • WAR and .wladapter are created.
    • If the target server is a local server and if the WAR file was not deployed to this server before: the WAR file is built and deployed to the server (no matter where you run the command from).
    • If the target server is a local server and if the WAR file was deployed to this server before: the WAR is not deployed again, unless you run the mfp push command from the root directory of your project (in which case the WAR is redeployed).
  • MobileFirst Native app: application-descriptor.xml and .wlapp are created and updated.
  • MobileFirst Hybrid app: application-descriptor.xml and .wlapp are created and updated with optional minification and concatenation.
  • Cordova app: Cordova app built, application-descriptor.xml and .wlapp are created and updated.
  • Android native app: wlClient.properties, application-descriptor.xml and .wlapp are created and updated.
  • iOS native app: worklight.plist, application-descriptor.xml and .wlapp are created and updated.
  • Standalone Windows Phone 8 native app: wlclient.properties, application-descriptor.xml and .wlapp are created and updated.
  • Standalone Windows Universal native app: Windows Universal consists of the platforms Windows 8 and Windows Phone Universal. wlclient.properties, application-descriptor.xml, and .wlapp are created and updated for both platforms.

Usage

Run this command in the current working directory, which is a child of a project.

$ mfp push

Important: If the certificate of the server is not recognized as a trusted certificate, the following error is displayed when you run this command: Failed to retrieve runtime information: CERT_UNTRUSTED. To add your certificate to the list of trusted certificates, see Specifying a trusted SSL certificate.