CodePro Analytix does have ant tasks and they are functional. Please see the documentation here.
https://developers.google.com/java-dev-tools/codepro/doc/features/ant/headless - It works even though the first line says the tasks are deprecated.
Both ant tasks codepro.audit and codepro.metrics works fine with Eclipse Juno. I was able to run both audit and metrics tasks on an existing workspace project by editing headless.xml and run_headless.bat files from https://developers.google.com/java-dev-tools/codepro/doc/features/ant/example/headless_existing_workspace_33.zip
I edited the default headless.xml to use a specific rule/metric set and to export the results in xml format.
<?xml version="1.0" encoding="UTF-8"?>
<project name="Ant Test" basedir="." default="main">
<target name="main">
<!-- the project source directory to be analyzed -->
<property name="projSrc" location="<full path to your project source folder>"/>
<!-- test codepro.audit -->
<codepro.audit auditRuleSetName="CodePro Default"
resultFile="headless_audit_out.txt">
<fileSet dir="${projSrc}"/>
<report file="audit_result.xml" format="xml">
</report>
</codepro.audit>
<!-- test codepro.metrics -->
<codepro.metrics metricSetName="CodePro Default"
resultFile="headless_metrics_out.txt">
<fileSet dir="${projSrc}"/>
<report file="metrics_result.xml" format="xml">
</report>
</codepro.metrics>
<echo message="It works!"/>
</target>
</project>