Introduction

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"
  classname="org.apache.commons.javaflow.ant.AntRewriteTask">
  <classpath>
    ...
  </classpath>
</taskdef>

Synopsis

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.

Examples

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

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