[ 
http://jira.codehaus.org/browse/MPMD-75?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MPMD-75.
---------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Won't Fix
    Fix Version/s: 2.4

bq. the patterns are all relative to the source roots.
Exclusions are controlled by two distinct parameters in the plugin: 
{{excludes}} for package/class names and {{excludeRoots}} for entire source 
roots. The later one should be the solution for your problems:
{code:xml}
<excludeRoots>
  <excludeRoot>target/generated/groovy-stubs</excludeRoot>
</excludeRoots>
{code}

I added some more doc about this in 
[r649704|http://svn.apache.org/viewvc?view=rev&revision=649704], hopefully 
clarifying this two-way exclusion handling.

> PMD plugin unable to exclude groovy-stub files.
> -----------------------------------------------
>
>                 Key: MPMD-75
>                 URL: http://jira.codehaus.org/browse/MPMD-75
>             Project: Maven 2.x PMD Plugin
>          Issue Type: Bug
>          Components: PMD
>    Affects Versions: 2.3
>         Environment: windows xp, java 1.6.0_04, maven 2.0.8, groovy 1.5.1, 
> groovy-maven-plugin 1.0-beta3
>            Reporter: Jonathan Baker
>            Assignee: Benjamin Bentmann
>             Fix For: 2.4
>
>
> When trying to run the pmd plugin to fail our build on a mixed java and 
> groovy project, I am unable to exclude groovy-generated java stubs.  It seems 
> as though all of the exclude patterns are package and filename filters only.  
> If this is true, then the only way to exclude groovy-generated java sources 
> would be to move all of our groovy files into a package that contains the 
> word groovy, or to name all of our groovy classes ClassNameGroovy.groovy.  
> This seems unacceptible.  The example on the webage for usage shows something 
> like this:
> <excludes>
>     <exclude>**/generated/*.java</exclude>
> </excludes>
> This implies that we could do something similar like this:
> <excludes>
>     <exclude>**/groovy-stubs/*.java</exclude>
> </excludes>
> But that doesn't seem to work because it ends up looking for 
> target/groovy-stubs/main/groovy-stubs/*.java because the patterns are all 
> relative to the source roots.

-- 
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

        

Reply via email to