Defining Tasks and Types

To be able to use the tasks and types provided by Micro Focus Ant support, an appropriate <taskdef> or <typedef> element must be included in the build file for each type or task being used.

If the build file needs to use the cobol, cobolclean, cobollbr or cobollink tasks and the mffilelist, mfdirlist or mfdestfilelist types, the following lines must be included:
    <project name="MyCOBOLProject" default="build" basedir=".">
        <taskdef name="cobol" classname="com.microfocus.ant.TaskCobol"/>
        <taskdef name="cobolclean" classname="com.microfocus.ant.TaskCobolClean"/>
        <taskdef name="cobollbr" classname="com.microfocus.ant.TaskCobolLbr"/>
        <taskdef name="cobollink" classname="com.microfocus.ant.TaskCobolLink"/>
        <typedef name="mffilelist" classname="com.microfocus.ant.TypeFileList"/>
        <typedef name="mfdirlist" classname="com.microfocus.ant.TypeDirectiveList"/>
        <typedef name="mfdestfilelist" classname="com.microfocus.ant.TypeDestinationFileList"/>
        ...
    </project>
If the build file needs to use the asm or asmclean tasks and the mffilelist, mfdirlist or mfdestfilelist types, the following lines must be included:
    <project name="MyASMProject" default="build" basedir=".">
        <taskdef name="asm" classname="com.microfocus.ant.TaskAsm"/>
        <taskdef name="asmclean" classname="com.microfocus.ant.TaskAsmClean"/>
        <typedef name="mffilelist" classname="com.microfocus.ant.TypeFileList"/>
        <typedef name="mfdirlist" classname="com.microfocus.ant.TypeDirectiveList"/>
        <typedef name="mfdestfilelist" classname="com.microfocus.ant.TypeDestinationFileList"/>
        ...
    </project>
If the build file needs to use the bms or bmsclean tasks and the mffilelist, mfdirlist or mfdestfilelist types, the following lines must be included:
    <project name="MyBMSProject" default="build" basedir=".">
        <taskdef name="bms" classname="com.microfocus.ant.TaskBms"/>
        <taskdef name="bmsclean" classname="com.microfocus.ant.TaskBmsClean"/>
        <typedef name="mffilelist" classname="com.microfocus.ant.TypeFileList"/>
        <typedef name="mfdirlist" classname="com.microfocus.ant.TypeDirectiveList"/>
        <typedef name="mfdestfilelist" classname="com.microfocus.ant.TypeDestinationFileList"/>
        ...
    </project>
If the build file needs to use the ims or imsclean tasks and the mffilelist, mfdirlist or mfdestfilelist types, the following lines must be included:
    <project name="MyIMSProject" default="build" basedir=".">
        <taskdef name="ims" classname="com.microfocus.ant.TaskIms"/>
        <taskdef name="imsclean" classname="com.microfocus.ant.TaskImsClean"/>
        <typedef name="mffilelist" classname="com.microfocus.ant.TypeFileList"/>
        <typedef name="mfdirlist" classname="com.microfocus.ant.TypeDirectiveList"/>
        <typedef name="mfdestfilelist" classname="com.microfocus.ant.TypeDestinationFileList"/>
        ...
    </project>
If the build file needs to use the pli, pliclean or plilink tasks and the mffilelist, mfdirlist or mfdestfilelist types, the following lines must be included:
    <project name="MyPLIProject" default="build" basedir=".">
        <taskdef name="pli" classname="com.microfocus.ant.TaskPli"/>
        <taskdef name="pliclean" classname="com.microfocus.ant.TaskPliClean"/>
        <taskdef name="plilink" classname="com.microfocus.ant.TaskPliLink"/>
        <typedef name="mffilelist" classname="com.microfocus.ant.TypeFileList"/>
        <typedef name="mfdirlist" classname="com.microfocus.ant.TypeDirectiveList"/>
        <typedef name="mfdestfilelist" classname="com.microfocus.ant.TypeDestinationFileList"/>
        ...
    </project>

Copyright © 1984-2015 Micro Focus. All rights reserved.