PMP

Description

This task invokes PMP: Macroprocessor on selected files.

PMP task is a directory based task for processing files in source directory with PMP: Macroprocessor. Create files will be placed in destination directory.

Parameters

Attribute Description Required
debug Specifies amount of outputted debug messages. no, default "0"
src source directory no
dest Destination directory yes
srcEncoding Encoding of source files. If not specified, default charset will be used. no
destEncoding Encoding for output files. If not specified, default charset will be used. no
failonerror Controls whether an error stops the build. If set to "false", error message is produced and the build continues with remaining files. no, default "false"
importPrefix Prefix prepended before name of property when imported from Ant into macroprocessor. no, default "ant:"
defaultConfig Specifies whether default configuration should be loaded before processing nested config element. no, default "true"

Parameters specified as nested elements

This task forms an implicit FileSet and supports all attributes of <fileset> as well as the nested <include>, <exclude> and <patternset> elements.

mapper

This task can use Mapper to transform source filenames to destination filenames.

Either Mapper must be present or dest must differ from src directory.

config

Macroprocessor configuration. This element is processed in the same way as configuration file.

export

Specifies macros which will be exported as Ant property.

Subelement all will export all macros.

Subelement macro will export contents of given macro.

Subelement classname will export class name of given macro.

Name of macro is specifeid by text data of element.

Elements macro and classname might contain following attributes:

Attribute Description Required
mode Specifies when should be export performed:
  • "first" - first definition
  • "last" - last definition
  • "concat" - concatenation of definitions
  • "sum" - sum of numerical values
no, default "first"
name Name of created property. Required only if you want to export macro under different name no

Examples

  <pmp src="${src}"
         dest="${build}"
         srcEncoding="utf-8" >
          <include name="*.pmp" />
      	  <mapper type="glob" from="*.pmp" to="*.txt" />
	</pmp>

processes all .pmp files under the ${src} directory, and stores output files with extension changed to .txt in the ${build} directory.


Copyright © 2006 Luděk Hlaváček. All rights Reserved.

$Id: pmp.html,v 1.7 2006/08/05 20:51:31 hlavl1am Exp $