Skip to content

Commit

Permalink
Added ant task to calculate JavaNCSS code statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Sep 18, 2009
1 parent 6753a8c commit a8b313e
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build.xml
Expand Up @@ -37,6 +37,15 @@
<property environment="env" />

<!-- Include the ant-contrib goodies -->
<taskdef name="javancss" classname="javancss.JavancssAntTask">
<classpath>
<pathelement location="${basedir}/develjar/javacc.jar"/>
<pathelement location="${basedir}/develjar/javancss.jar"/>
<pathelement location="${basedir}/develjar/ccl.jar"/>
<pathelement location="${basedir}/develjar/jhbasic.jar"/>
</classpath>
</taskdef>
<!-- Include the JavaNCSS goodies -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${basedir}/develjar/ant-contrib-1.0b3.jar"/>
Expand Down Expand Up @@ -1093,6 +1102,24 @@
</java>
</target>

<target name="javancss" id="javancss" depends="runDoclet">
<mkdir dir="${build}" />
<echo>Calculating source statistics...</echo>
<javancss srcdir="${src}/main" includes="**/*.java"
generateReport="true"
outputfile="${build}/cdk_metrics.xml"
format="plain"
classMetrics="false"
functionMetrics="false"
/>
<javancss srcdir="${src}/test" includes="**/*.java"
generateReport="true"
outputfile="${build}/cdktest_metrics.xml"
format="plain"
classMetrics="false"
functionMetrics="false"
/>
</target>

<!-- Regenerate template fingerprints in case the fingerprint code has been updated
so that fingerprint bits are different from a previous version -->
Expand Down

0 comments on commit a8b313e

Please sign in to comment.