1 Reply Latest reply on Nov 15, 2009 2:01 AM by Xavier Agnetti

    stepping through the code

    bkhatl Level 1

      Using Eclipse, latest build, on a Mac, I'm stepping through the FlexPMD code.  I enter in the debug configuration the parameters "-s <src dir>" and "-o <output dir>".  Those arguments are successfully passed into FlexPMD but when the FileUtils tries to locate the Flex source files, I have some ActionScript, *.as, files in the <src dir>, I get an error:

      Exception in thread "main" net.sourceforge.pmd.PMDException: sourceDirectory does not contain any Flex sources (Specify the source directory in relative (not absolute))
          at com.adobe.ac.pmd.files.impl.FileUtils.getFlexFiles(FileUtils.java:107)
          at com.adobe.ac.pmd.files.impl.FileUtils.computeFilesList(FileUtils.java:52)
          at com.adobe.ac.pmd.FlexPmdViolations.computeFiles(FlexPmdViolations.java:128)
          at com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:92)
          at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.ja va:153)
          at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:1 36)
          at com.adobe.ac.pmd.commandline.FlexPMD.startFlexPMD(FlexPMD.java:115)
          at com.adobe.ac.pmd.commandline.FlexPMD.main(FlexPMD.java:69)

       

      Since the 'args' parameter in the main function is getting the '-s' and '<src dir>' parameters, I'm not sure what is it complaining.  I don't see anything in the source code what those parameters are being discarded.

       

      Any ideas?

      Thanks

      Brenda

        • 1. Re: stepping through the code
          Xavier Agnetti Adobe Employee

          Hi Brenda!

           

          I don't think I understood your problem.

           

          The error you mentioned means that the source folder you specified does not contain any Flex source files (*.as, *.mxml)

           

          Are you saying that you have a folder with Flex source files, and that those files are not picked up by FlexPMD?

           

          Any FlexPMD clients (command-line, Maven, Ant, ...) are using AbstractFlexPmdEngine which uses the class FlexPmdParameters

           

          I don't see any reasons why your source folder would be discarded.

           

          Best

           

          Xavier