deploy
Syntax and description
The deploy command deploys a MobileTogether package (.mtp file) to MobileTogether Server. When a MobileTogether package is created in MobileTogether Designer, the deployment path can be specified in the package, but does not need to be. The arguments and options of the deploy command described below take this into account.
mobiletogetherserver deploy [options] Package [Path] |
•Package specifies the path to the MobileTogether package that you want to deploy.
•Path (optional) specifies the location on the server where you want to deploy the package. If this argument is specified on the command line and the package already contains a deployment path, then the path supplied on the command line is used and the deployment path in the package is ignored. If this argument is not supplied and the package contains no deployment path, then an error message about this is displayed.
•If a package having the same name already exists at the deployment location and you want to overwrite it, use the force option (see below). If you do not use force in this situation, an error will be displayed, indicating that a package already exists at the specified deployment location.
•You can specify the input parameters that will be used in actions of the project's OnServerDeploy event (see the MobileTogether Designer documentation).
Note: | The server must be stopped before this command is executed. |
MobileTogetherServer on Windows mobiletogetherserver on Windows and Unix (Linux, Mac)
* Note that lowercase (mobiletogetherserver) works on all platforms (Windows, Linux, and Mac), while upper-lower (MobileTogetherServer) works only on Windows and Mac. * Use forward slashes on Linux and Mac, backslashes on Windows.
|
On Windows systems: When spaces or special characters occur in strings (for example in file or folder names, or company, person or product names), use quotes: for example, "My File". Note, however, that a backslash followed by a double-quotation mark (for example, "C:\My directory\") might not be read correctly. This is because the backslash character is also used to indicate the start of an escape sequence, and the escape sequence \" stands for the double-quotation mark character. If you want to escape this sequence of characters, use a preceding backslash, like this: \\". To summarize: If you need to write a file path that contains spaces or an end backslash, write it like this: "C:\My Directory\\".
|
Example
Examples of the deploy command:
mobiletogetherserver deploy "C:\temp\ParcelDelivery.mtp"
mobiletogetherserver deploy --force "C:\temp\ParcelDelivery.mtp"
mobiletogetherserver deploy "C:\temp\ParcelDelivery.mtp" "/public/ParcelDelivery"
mobiletogetherserver deploy --force "C:\temp\ParcelDelivery.mtp" "/public/ParcelDelivery"
mobiletogetherserver deploy --force --force_solutionfile=datalib\cust-NY.sqlite --force_solutionfile=datalib\cust-MA.sqlite "C:\temp\ParcelDelivery.mtp"
mobiletogetherserver deploy --force --input_parameters="P1=5089; MyP2='space separated words'; SomeP3=JoinedWords" "C:\temp\ParcelDelivery.mtp"
Options
Options are listed in short form (if available) and long form. You can use one or two dashes for both short and long forms. An option may or may not take a value. If it takes a value, it is written like this: --option=value. Values can be specified without quotes except in two cases: (i) when the value string contains spaces, or (ii) when explicitly stated in the description of the option that quotes are required. If an option takes a Boolean value and no value is specified, then the option's default value is TRUE. Use the --h, --help option to display information about the command.
--datadir = PathToDatabaseDirectory Specifies the path of the database directory.
|
--force If this option is specified, then the MobileTogether package that is being deployed (by the deploy command) will overwrite any package of the same name that is at the location specified by the deployment path used by the deploy command. The deployment path is taken either from the package or is specified in the Path argument (see above). If you do not use force in this situation, an error will be displayed, indicating that a package already exists at the specified deployment location.
|
--force_solutionfile = PathToSSSFile Specifies an already deployed server side solution file that you want to overwrite. The PathToSSSFile is the path to the server side solution file on the server and it is relative to the server side solution's working directory. To overwrite multiple solution files, specify this option as many times as required (see example above). If an existing solution file is not specified using this option, then it is not overwritten.
It is assumed that the server side solution files are available in the package. If a solution file exists in the package but is not present on the server, then it is written to the server.
|
--input_parameters = Parameters Defines the parameters of actions that are executed for the OnServerDeploy event. The entire parameter list must be enclosed in quotes. Parameter values must be enclosed in single quotes.
For example: --input_parameters="P1=5089; P2='space separated words'; P3=JoinedWords"
Also see the examples above.
|