Administering MobileFirst applications through Ant
You can administer MobileFirst applications through the wladm 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 wladm Ant task.
- The wladm program.
- The MobileFirst administration REST services.
The wladm Ant task and the wladm program are simpler to use and have better error reporting than the REST services. The advantage of the wladm Ant task over the wladm program is that it is platform independent and easier to integrate when integration with Ant is already available.
Prerequisites
Apache Ant is required to run the wladm task. For information about the minimum supported version of Ant, see System requirements.For
convenience, Apache Ant 1.8.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
You can use the wladm Ant
task on a different computer than the one on which you installed MobileFirst Server.
- Copy the file product_install_dir/WorklightServer/worklight-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 wladm Ant task, add this
initialization command to the Ant script:
<taskdef resource="com/worklight/ant/deployers/antlib.xml">
<classpath>
<pathelement location="product_install_dir/WorklightServer/worklight-ant-deployer.jar"/>
</classpath>
</taskdef>
Other initialization commands that
refer to the same worklight-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/worklight/ant/defaults.properties">
<classpath>
<pathelement location="product_install_dir/WorklightServer/worklight-ant-deployer.jar"/>
</classpath>
</taskdef>