Skip to main content
Participant
January 4, 2010
Answered

FlexCPD ANT task error

  • January 4, 2010
  • 1 reply
  • 964 views

FlexPMD is working like a charm but I got the following error when trying to use FlexCPD:


taskdef A class needed by class com.adobe.ac.cpd.ant.FlexCpdAntTask cannot be found: net/sourceforge/pmd/cpd/Renderer

This is my task definition:

<taskdef name="cpd" classname="com.adobe.ac.cpd.ant.FlexCpdAntTask" classpath="${jar.dir}/flex-pmd-cpd-ant-task-${flexpmd.version}.jar">
        <classpath>
            <pathelement location="${jar.dir}/flex-pmd-files-${flexpmd.version}.jar" />
            <pathelement location="${jar.dir}/flex-pmd-cpd-${flexpmd.version}.jar" />
            <pathelement location="${jar.dir}/as3-plugin-utils-${flexpmd.version}.jar" />
            <pathelement location="${jar.dir}/as3-parser-${flexpmd.version}.jar" />
            <pathelement location="${jar.dir}/as3-parser-api${flexpmd.version}.jar" />
            <pathelement location="${jar.dir}/pmd-4.2.5.jar" />
        </classpath>
</taskdef>

Am I missing a JAR? I copied the task definition from FlexCPD page

Any Clue?

UPDATED:

I got a similar issue with Metrics:

taskdef A class needed by class com.adobe.ac.pmd.metrics.ant.FlexMetricsAntTask cannot be found: org/dom4j/DocumentException

FlexPMD still works fine...

Thanks,

Diego

This topic has been closed for replies.
Correct answer Xavier Agnetti

For those two errors, the pmd-4.2.5.jar and the dom4j-*.jar is missing.

They are either missing from the class path, or not present in your ${jar.dir} directory.

Best

Xavier

1 reply

Xavier AgnettiCorrect answer
Adobe Employee
January 5, 2010

For those two errors, the pmd-4.2.5.jar and the dom4j-*.jar is missing.

They are either missing from the class path, or not present in your ${jar.dir} directory.

Best

Xavier

dguebelAuthor
Participant
January 5, 2010

Good catch! I was poining to pmd-4.2.5.jar but had pmd-4.2.2.jar on my

jar's folder.

Thanks,

Diego