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.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.ja va:153)
at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:1 36)
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.
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.