2 Replies Latest reply on Dec 4, 2009 12:14 AM by Roaders

    Error running flex PMD in Ant

    Roaders Level 1

      Hi Guys

       

      I'm trying to get Flex PMD running in my ant build but am running into a few problems.

       

      My task definition:

       

          <property name="flexpmd.version" value="1.0.RC5" />

          <property name="flexpmd.dir" value="${LIBS.dir}/flexpmd" />

       

      <taskdef name="flexPmd"

      classname="com.adobe.ac.pmd.ant.FlexPmdAntTask"

      classpath="${flexpmd.dir}/flex-pmd-ant-task-${flexpmd.version}.jar"

      >

              <classpath>

                  <pathelement location="${flexpmd.dir}/flex-pmd-ruleset-api-${flexpmd.version}6.jar"/>

                  <pathelement location="${flexpmd.dir}/flex-pmd-ruleset-${flexpmd.version}.jar"/>

                  <pathelement location="${flexpmd.dir}/flex-pmd-core-${flexpmd.version}.jar"/>

                  <pathelement location="${flexpmd.dir}/as3-plugin-utils-${flexpmd.version}.jar"/>

                  <pathelement location="${flexpmd.dir}/as3-parser-${flexpmd.version}.jar"/>

                  <pathelement location="${flexpmd.dir}/pmd-4.2.2.jar"/>

                  <pathelement location="${flexpmd.dir}/commons-lang-2.4.jar"/>

                  <pathelement location="${flexpmd.dir}/flex-pmd-files-${flexpmd.version}.jar"/>

                  <pathelement location="${flexpmd.dir}/as3-parser-api-${flexpmd.version}.jar"/>

                  <pathelement location="${flexpmd.dir}/plexus-utils-1.0.2.jar"/>

              </classpath>

      </taskdef>

       

      and my results:

       

      C:\dev\workspaces\RTC\UUI_Core_ANT>ant -f buildLocalDebug.xml

      Buildfile: buildLocalDebug.xml

      Trying to override old definition of task manifest

       

      createCoreFileSystem:

       

      compileLocalDebugCoreLibs:

       

      compileCoreLib:

      [manifest] running manifest generator

      [manifest] done

      [manifest] running manifest generator

      [manifest] done

      [manifest] running manifest generator

      [manifest] done

          [compc] Loading configuration file C:\dev\flexsdk\4.0.0.10708\frameworks\fle

      x-config.xml

          [compc] Loading configuration file C:\dev\workspaces\RTC\UUI_Shared_ANT\flex

      -config.xml

          [compc] C:\dev\workspaces\RTC\UUI_Shared_Libs\UUI\UUI_Core.swc (1996936 byte

      s)

       

      BUILD FAILED

      C:\dev\workspaces\RTC\UUI_Core_ANT\buildLocalDebug.xml:16: The following error o

      ccurred while executing this line:

      C:\dev\workspaces\RTC\UUI_Core_ANT\includes\UUI_Core.xml:55: java.lang.NoClassDe

      fFoundError: net/sourceforge/pmd/RuleSetFactory

       

      Total time: 5 seconds

      C:\dev\workspaces\RTC\UUI_Core_ANT>

       

      The task def is ok as I don't get an error at the start, only when the task tries to run. I've had a look at the jars in the zip I downloaded and can't find the RuleSetFactory class anywhere.

       

      I have just today downloaded the latest ant zip so must have the latest version. Any ideas?

       

      Thanks