Assuming that you know at least a little bit about ant and registering tasks. This is what it should look like

01: <target name="test" description="Test this task on this project" depends="jar">
02: 	<taskdef name="project-filestatistics" classname="synapticloop.ant.ProjectFileStatistics" classpath="project-filestatistics.jar"/>
03: 	<project-filestatistics ignoreBinary="true" outputDirectory="${basedir}">
04: 		<fileset dir=".">
05: 			<include name="**/*.*"/>
06: 			<exclude name="**/.project"/>
07: 			<exclude name="**/*.MF"/>
08: 			<exclude name="**/.classpath"/>
09: 			<exclude name="**/*.container"/>
10: 			<exclude name="**/*.component"/>
11: 			<exclude name="**/.jsdtscope"/>
12: 			<exclude name="**/*.name"/>
13: 			<exclude name="**/*.prefs"/>
14: 			<exclude name="**/.pydevproject"/>
15: 			<exclude name="build/**/*.*"/>
16: 			<exclude name="dist/**/*.*"/>
17: 		</fileset>
18: 	</project-filestatistics>
19: </target>

01: Here is your standard target definition

02: Register the project-filestatistics as a task with the following attributes:

03: Kick of the project-filestatistics task. This task can have the following attributes.

04 to 17: Define the filesets that the statistics should be generated over - note that for an eclipse based setup - I have ignored my favourite plugins and extensions.

18: End of the task

19: End of the target

You can download the above snippet project-filestatistics-snippet.txt