From documentation currently FlexPMD runs in the
site phase but I need it to run in the
compile phase. Is this possible?
The original problem is: I want to prevent project successful building if there is any violation errors the same way as pmd works for Java.
Yes -- put the plugin in the build plugins section with executions: