You can administer MobileFirst applications
through the mfpadm Ant task.
Comparison with other facilities
You can
execute administration operations with
IBM MobileFirst™ Platform Foundation in
the following ways:
- The MobileFirst Operations Console,
which is interactive.
- The mfpadm Ant task.
- The mfpadm program.
- The MobileFirst administration
REST services.
The
mfpadm Ant task,
mfpadm program,
and REST services are useful for automated or unattended execution
of operations, such as:
- Eliminating operator errors in repetitive operations, or
- Operating outside the operator's normal working hours, or
- Configuring a production server with the same settings as a test
or preproduction server.
The mfpadm Ant task and the mfpadm program
are simpler to use and have better error reporting than the REST services.
The advantage of the mfpadm Ant task over the mfpadm program
is that it is platform independent and easier to integrate when integration
with Ant is already available.
Prerequisites
The mfpadm tool
is installed with the MobileFirst Server installer.
In the rest of this page, product_install_dir indicates
the installation directory of the MobileFirst Server installer.
Apache
Ant is required to run the
mfpadm task. For information
about the minimum supported version of Ant, see
System requirements.
For
convenience, Apache Ant 1.9.4 is included in
MobileFirst Server.
In the
product_install_dir/shortcuts/ directory,
the following scripts are provided.
- ant for UNIX / Linux
- ant.bat for Windows
These scripts are ready to run, which means that they do not
require specific environment variables. If the environment variable
JAVA_HOME is
set, the scripts accept it.
You can use the
mfpadm Ant
task on a different computer than the one on which you installed
MobileFirst Server.
- Copy the file product_install_dir/MobileFirstServer/mfp-ant-deployer.jar to
the computer.
- Make sure that a supported version of Apache Ant and a Java™ runtime environment are installed
on the computer.
To use the
mfpadm Ant task, add this
initialization command to the Ant script:
<taskdef resource="com/ibm/mfp/ant/deployers/antlib.xml">
<classpath>
<pathelement location="product_install_dir/MobileFirstServer/mfp-ant-deployer.jar"/>
</classpath>
</taskdef>
Other initialization commands that
refer to the same
mfp-ant-deployer.jar file are
redundant because the initialization by
defaults.properties is
also implicitly done by
antlib.xml. Here is one
example of a redundant initialization command:
<taskdef resource="com/ibm/mfp/ant/defaults.properties">
<classpath>
<pathelement location="product_install_dir/MobileFirstServer/mfp-ant-deployer.jar"/>
</classpath>
</taskdef>
For more information about running
the MobileFirst Server installer,
see Running IBM® Installation
Manager.