Hi,
you need to ensure that the Tomcat instance under test runs with the
JaCoCo agent. Documentation shows how to configure the agent:
http://www.jacoco.org/jacoco/trunk/doc/agent.html
Typically Tomcat comes with its own configuration files where you can do
this.
In case you want to dynamically configure the agent during your build
the jacoco:agent task simply helps you assemble the command line option.
After tomcat is properly terminated the agent writes a execution data
file (e.g. jacoco.exec). Using this file and the original class files a
report can be generated with the jacoco:report task.
The process and all Ant tasks are documented:
http://www.jacoco.org/jacoco/trunk/doc/ant.html
Regards,
-marc