Bertram Weber - 2010-03-29

Hello,

Is it possible to integate Metrics 1.3.7 in a Ant build file and to determine OO Metrics for  Java Source Code Files?.
I have integrated the following metrics target in a build-file :

       <target name="metrics">
               <metrics.export projectName="${source.generic}" file="${output.xml}/metrics.xml" />
               <!-xslt in="${build.dir}/xml/${name}-metrics-${DSTAMP}.xml" out="${build.dir}/html/${name}-metrics.html" style="metrics.xsl" /->
       </target>

I call ant metrics from the command line but  I get the following error:
> C:\TQS(neu)\0_Produkte\01_TQS_light\trunk>ant metrics
>Buildfile: C:\TQS(neu)\0_Produkte\01_TQS_light\trunk\build.xml
>
>metrics:
>
>BUILD FAILED
>C:\TQS(neu)\0_Produkte\01_TQS_light\trunk\build.xml:124: Problem: failed to crea
>te task or type metrics.export
>Cause: The name is undefined.
>Action: Check the spelling.
>Action: Check that any custom tasks/types have been declared.
>Action: Check that any <presetdef>/<macrodef> declarations have taken place

I have put  the following jars  ant-metricstasks.jar, jdbm.jar and
metrics.jar (from net.sourceforge.metrics_1.3.6.jar ) in the ant lib directory.
But it doesn't work. I get the above mentioned error.
Can someone help me?

For Your help many  thanks in advance.

Best Regards

Bertram