Cleans all the COBOL build artifacts created by the cobol task.
Attribute | Description | Required |
---|---|---|
debug | If true, debugging artifacts are also cleaned. Defaults to false. | No |
destdir | The name of the directory containing the build artifacts to be cleaned. | Yes |
desttype | The type of the build artifacts that are to be cleaned. The value of this attribute must be one of "obj", "dll", "exe", "int", "gnt" or "jvm". Defaults to "obj". | No |
failonerror | If true, stops the build process if the task exits with a return-code other than 0. Defaults to false. | No |
genlistingfile | If true, indicates that a listing file is generated for the compilation whose artifacts are to be cleaned. Defaults to false. | No |
retaindirectivesfile | If true, indicates that a directives file is retained for the compilation whose artifacts are to be cleaned. Defaults to false. | No |
userEnv | The name of the properties file that contains the user specified environment variables. | No |
verbose | If true, causes additional informational messages to be displayed by the task. Defaults to false. | No |
analysisData | If set to standalone, the compiler only produces data to be analyzed by the code analysis task (see analysis task). No build artifacts are created. If set to atCompilation, the compiler produces both the build artifacts and the data to be analyzed by the code analysis task. If this parameter is omitted, the compiler only produces the build artifacts. | No |
By default, the return code of a <cobolclean> task is ignored. When you set failonerror="true", any non-zero response is treated as an error and means the build exits.
Remove all build artifacts and debug artifacts for a referenced mffilelist element:
<mffilelist id="source.files" srcdir="${basedir}" type="srcfile"> <file name="Program2.cbl"/> <file name="Program3.cbl"/> <file name="Program4.cbl" srcdir="folder1"/> </mffilelist> <cobolclean desttype="obj" destdir="${basedir}/output" debug="true"> <mffilelist refid="source.files"/> </cobolclean>
Remove all build artifacts for a nested mffilelist element:
<cobolclean desttype="obj" destdir="${basedir}/output"> <mffilelist> <file name="Program2.cbl"/> <file name="Program3.cbl"/> <file name="Program4.cbl" srcdir="folder1"/> </mffilelist> </cobolclean>
Remove all build artifacts and debug artifacts for a nested mffilelist element and additional build artifacts using a nested mfdestfilelist element:
<cobolclean desttype="obj" destdir="${basedir}/output" debug="true"> <mffilelist id="source.files" srcdir="${basedir}" type="srcfile"> <file name="Program2.cbl"/> <file name="Program3.cbl"/> <file name="Program4.cbl" srcdir="folder1"/> </mffilelist> <mfdestfilelist> <file name="${basedir}/output/Program1.exe"/> </mfdestfilelist> </cobolclean>