+

Search Tips   |   Advanced Search

Update deployment scripts

If we use Ant tasks app-deployer or adapter-deployer to deploy apps or adapters, update the Ant scripts to use the Ant task wladm.

If we have Ant scripts that deploy apps or adapters using the Ant tasks app-deployer or adapter-deployer, update them to use the Ant task wladm. The Ant tasks app-deployer or adapter-deployer no longer apply in IBM MobileFirst Platform Foundation v6.3.0.

In the following code samples, mf_install_dir is the directory where you installed MobileFirst Server.

  1. In the initialization commands of the Ant script, replace the path as follows:
    <taskdef resource="com/worklight/ant/defaults.properties">
      <classpath>
        <pathelement location="mf_install_dir/WorklightServer/worklight-ant-deployer.jar"/>
      </classpath>
    </taskdef>
    With
    <taskdef resource="com/worklight/ant/deployers/antlib.xml">
      <classpath>
        <pathelement location="mf_install_dir/WorklightServer/worklight-ant-deployer.jar"/>
      </classpath>
    </taskdef>

  2. Replace <app-deployer> calls.
    <app-deployer deployable="myApp.wlapp"
                  worklightserverhost="http://server-address:port/project-name"
                  userName="username" password="password"/>
    With
    <wladm url="https://server-address:secure-port/worklightadmin" user="username" password="password">
      <deploy-app runtime="project-name" file="myApp.wlapp"/>
    </wladm>

    Set the placeholders as follows:

    • For worklightadmin, substitute the actual context root of the MobileFirst administration services web application

    • For username and password, pick a user that is in the role worklightadmin or worklightdeployer.

  3. Replace <adapter-deployer> calls.
    <adapter-deployer deployable="myAdapter.adapter"
                      worklightserverhost="http://server-address:port/project-name"
                      userName="username" password="password"/>
    With
    <wladm url="https://server-address:secure-port/worklightadmin" user="username" password="password">
      <deploy-adapter runtime="project-name" file="myAdapter.adapter"/>
    </wladm>

    Set the placeholders as follows:

    • For worklightadmin, substitute the actual context root of the MobileFirst administration services web application.

    • For username and password, you need to pick a user that is in the role worklightadmin or worklightdeployer.

For more information about the wladm Ant task, see Administer MobileFirst applications through Ant.


Parent topic: Upgrading to MobileFirst Server v6.3.0 in a production environment