Migrate a project WAR file for use with a new MobileFirst Server
Use Ant tasks to migrate a project WAR file so we can deploy it manually to a new version of MobileFirst Server.
You migrate a project WAR file by running a <migrate> Ant task, which is included in the worklight-ant-deployer.jar library. We can migrate .war files that are developed in V5.0.6 of this product and later. To run the Ant task, you invoke it from an Ant XML file similar to the following example:
<?xml version="1.0" encoding="UTF-8"?> <project name="MigrateWarFile" default="migrate" basedir="."> <target name="migrate"> <echo message="Loading Ant Tool" /> <taskdef resource="com/worklight/ant/defaults.properties"> <classpath> <pathelement location="worklight-ant-deployer.jar" /> </classpath> </taskdef> <migrate sourceWarFile="d:/myOldWarFolder/myProject.war" destWarFile="d:/myNewWarFolder/myMigratedProject.war"/> </target> </project>The <migrate> task accepts the following input parameters:
- sourceWarFile
- (mandatory) The path to the source project WAR file. The path must not contain spaces.
- destWarFile
- (optional) The destination file for the migrated WAR file. Default value: <source-war-folder>/migrated-to-<new version number>/<source-war-filename>.
Parent topic: Deploy a project WAR file manually.