+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Calling the mfpadm Ant task

We can use the mfpadm Ant task and its associated commands to administer MobileFirst applications.


Syntax

Call the mfpadm Ant task as follows:


Attributes

The mfpadm Ant task has the following attributes:

Table 1. List of <mfpadm> attributes
Attribute Description Required Default
url The base URL of the MobileFirst web application for administration services Yes  
secure Whether to avoid operations with security risks No true
user The user name for accessing the MobileFirst administration services Yes  
password The password for the user Either one is required  
passwordfile The file that contains the password for the user  
timeout Timeout for the entire REST service access, in seconds No  
connectTimeout Timeout for establishing a network connection, in seconds No  
socketTimeout Timeout for detecting the loss of a network connection, in seconds No  
connectionRequestTimeout Timeout for obtaining an entry from a connection request pool, in seconds No  
lockTimeout Timeout for acquiring a lock No  

The mfpadm call contains commands that are encoded in inner elements. These commands are executed in the order in which they are listed. If one of the commands fails, the remaining commands are not executed, and the mfpadm call fails.


Elements

We can use the following elements in mfpadm calls:

Table 2. Elements that can be used in <mfpadm>
Element Description Count
show-info Shows user and configuration information 0..∞
show-global-config Shows global configuration information 0..∞
show-diagnostics Shows diagnostics information 0..∞
show-versions Shows versions information 0..∞
unlock Releases the general-purpose lock 0..∞
list-runtimes Lists the runtimes 0..∞
show-runtime Shows information about a runtime 0..∞
delete-runtime Deletes a runtime 0..∞
show-user-config Shows the user configuration of a runtime 0..∞
set-user-config Specifies the user configuration of a runtime 0..∞
show-confidential-clients Shows the configurations of confidential clients of a runtime 0..∞
set-confidential-clients Specifies the configurations of confidential clients of a runtime 0..∞
set-confidential-clients-rule Specifies a rule for the confidential clients configuration of a runtime 0..∞
list-adapters Lists the adapters 0..∞
deploy-adapter Deploys an adapter 0..∞
show-adapter Shows information about an adapter 0..∞
delete-adapter Deletes an adapter 0..∞
adapter Other operations on an adapter 0..∞
list-apps Lists the apps 0..∞
deploy-app Deploys an app 0..∞
show-app Shows information about an app 0..∞
delete-app Deletes an app 0..∞
show-app-version Shows information about an app version 0..∞
delete-app-version Delete a version of an app 0..∞
app Other operations on an app 0..∞
app-version Other operations on an app version 0..∞
list-devices Lists the devices 0..∞
remove-device Removes a device 0..∞
device Other operations for a device 0..∞
list-farm-members Lists the members of the server farm 0..∞
remove-farm-member Removes a server farm member 0..∞


XML Format

The output of most commands is in XML, and the input to specific commands, such as <set-accessrule>, is in XML too. We can find the XML schemas of these XML formats in the product_install_dir/MobileFirstServer/mfpadm-schemas/ directory. The commands that receive an XML response from the server verify that this response conforms to the specific schema. We can disable this check by specifying the attribute xmlvalidation="none".


Output character set

Normal output from the mfpadm Ant task is encoded in the encoding format of the current locale. On Windows, this encoding format is the so-called "ANSI code page". The effects are as follows:

To work around this limitation:

Parent topic: Administering MobileFirst applications through Ant