3.2. ANT usage

Parameters specified as attributes

AttributeDescriptionRequired
[common EMMA task attributes]No
instrpathA path-like structure specifying the instrumentation path to use.Either this attribute, or instrpathref attribute, or at least one nested <instrpath> element must be present.
instrpathrefSame as instrpath, but given as a reference to a path defined elsewhere.Either this attribute, or instrpath attribute, or at least one nested <instrpath> element must be present.
destdir, outdirThe location to store instrumented class files (in fullcopy mode instrumented classes are stored in destdir/classes and instrumented archives are stored in destdir/lib subdirectories, respectively). Ignored if mode='overwrite'.Yes, unless mode='overwrite'
metadatafile, outfileThe location to store class coverage metadata (default: file coverage.em in the current directory). Neither particular file name nor extension are required.No
mergeIndicates whether the metadata should be merged into the destination metadatafile, if any (default: true). Any existing data is clobbered otherwise.No
modeSpecifies the instrumentation output mode. Valid values for this property are:
  • copy (default): copy only instrumented class files and archive entries into destdir directory.
  • overwrite: overwrite input class files and archives.
  • fullcopy: copy all (instrumented or not) class files and archives to destdir/classes and destdir/lib, respectively.
See Section 3.1, “Description” for more details.
No
filterAdds an instrumentation filter. See Section 6.2, “Coverage filters” for general description of EMMA's instrumentation filters and Section 6.2.1, “filter syntax: ANT” specifically for ANT syntax.No

Parameters specified as nested elements

ElementDescriptionRequired
[common EMMA task nested elements]No
<instrpath>A path-like structure that specifies the instrumentation path to use.Either instrpath attribute, or instrpathref attribute, or at least one nested <instrpath> element must be present.
<filter>Adds an instrumentation filter. See Section 6.2, “Coverage filters” for general description of EMMA's instrumentation filters and Section 6.2.1, “filter syntax: ANT” specifically for ANT syntax.No

<instrpath> nested elements. <instrpath> is a path-like structure used to select class files and archives to be processed for instrumentation. If a duplicate class name is encountered during a single instrumentation pass, only the first class definition will be added to the class metadata emitted during this instrumentation path. See Class metadata merging. for more details.

Examples