Skip to main content
Participant
November 13, 2009
Question

stepping through the code

  • November 13, 2009
  • 1 reply
  • 525 views

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.java:153)
    at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:136)
    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

This topic has been closed for replies.

1 reply

Adobe Employee
November 15, 2009

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