commons-javaflow.jar contains an Ant task implementation that instruments class files for javaflow. To use this task in your build script, first declare it as follows:

<taskdef name="javaflow"


The javaflow task forms an implicit FileSet and supports all attributes of <fileset> (dir becomes srcdir) as well as the nested <include>, <exclude> and <patternset> elements.

Parameter attributes

Attribute Description Required?
srcdir directory from which the instrumented class files will be read. This is used as the base directory for the implicit FileSet that the javaflow task forms. yes
dstdir directory to which the instrumented class files will be placed. This can be the same directory as the source directory. yes

When srcdir==dstdir, class files are touched only when they are not yet instrumented.


<javaflow srcdir="build/classes" dstdir="build/classes">
  <include name="**/*.class" />

Instrument all the class files in the build/classes directory in-place.