[ http://jira.codehaus.org/browse/MPMD-77?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=130597#action_130597 ]
Justin Edelson commented on MPMD-77: ------------------------------------ to workaround: <configuration> <excludeRoots> <excludeRoot>${basedir}/target/generated-sources/axis</excludeRoot> </excludeRoots> </configuration> > excludeRoots doesn't work with basedir-relative paths > ----------------------------------------------------- > > Key: MPMD-77 > URL: http://jira.codehaus.org/browse/MPMD-77 > Project: Maven 2.x PMD Plugin > Issue Type: Bug > Affects Versions: 2.3 > Reporter: Justin Edelson > Priority: Critical > Attachments: pmd-patch.patch, pmd_patch2.patch > > > According to http://maven.apache.org/plugins/maven-pmd-plugin/pmd-mojo.html, > the excludeRoots property is supposed to suppress PMD report generation for > certain source roots. However, in practice this does not work with this type > of configuration: > <configuration> > <excludeRoots> > > <excludeRoot>target/generated-sources/axis</excludeRoot> > </excludeRoots> > </configuration> > On line 265 of AbstractPmdReport, a new File object is created for each > excludeRoot element. Then, on line 346, each compileSourceRoot is checked to > see if the List of excludeRoot File objects contains it. This test will never > return true as the compileSourceRoot File objects are absolute and the > excludeRoot File objects are relative. > The simplest solution (seen in the attached patch) is to create absolute File > objects for each excludeRoot. > I tried created a unit test to demonstrate this problem, but couldn't quite > nail it down. I'll keep trying.... -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira