wladm Ant task
Overview
We can execute administration operations with MPF in the following ways:
- operations console (interactive)
- wladm Ant task
- wladm program
- REST services
The wladm Ant task, wladm program, and REST services are useful for automated or unattended execution of operations. The wladm Ant task and the wladm program are simpler to use, and have better error reporting than the REST services.
Prerequisites
Apache Ant 1.8.4 can be found in...
MF_HOME/shortcuts/ant
the ant script does not require specific environment variables. If JAVA_HOME is set, the script accept it.
To use the wladm Ant task on a computer that does not have MobileFirst Server installed...
- Copy the jar file to the destination computer...
MF_HOME/WorklightServer/worklight-ant-deployer.jar
- On the destination computer, verify a supported version of Apache Ant and a Java runtime environment are installed.
Add this initialization command to the Ant script:
<taskdef resource="com/worklight/ant/deployers/antlib.xml"> <classpath> <pathelement location="MF_HOME/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="MF_HOME/WorklightServer/worklight-ant-deployer.jar"/> </classpath> </taskdef>
See
- Call the wladm Ant task
- Commands for adapters
- Commands for apps
- Commands for beacons
- Commands for devices
- Commands for troubleshooting
- Complex example
Parent topic: Administer MobileFirst applications