I am trying to do the following:
- I have a standard POM defined for all my Maven2 projects.
- What POM includes tools for use, and for PMD - used ruleset.
- I defined a property that names these rule sets each.
To find out that it works. I can define a new POM project, use it as a parent for my standard POM, and use the rules set there. I can even override a property definition that defines a rule set with a different name.
I determined that as auth-pmd-rule-set-3.x-v1-5.xml instead of pmd-rule-set-3.x-v1-5.xml (which is then selected by Maven2) and included the auth-pmd-rule-set-3.x-v1-5.xml file auth-pmd-rule-set-3.x-v1-5.xml locally in my new project (under src/main/resources ). But Maven doesn't find him. The error messages are as follows:
[DEBUG] Preparing a rule set: auth-pmd-rule-set-3.x-v1-5.xml
[DEBUG] Before: auth-pmd-rule-set-3.x-v1-5.xml After: auth-pmd-rule-set-3.x-v1-5.xml
[DEBUG] Resource 'auth-pmd-rule-set-3.x-v1-5.xml' not found with resourceLoader org.codehaus.plexus.resource.loa der.FileResourceLoader.
[DEBUG] Resource 'auth-pmd-rule-set-3.x-v1-5.xml' not found with resourceLoader org.codehaus.plexus.resource.loa der.JarResourceLoader.
[DEBUG] Resource 'auth-pmd-rule-set-3.x-v1-5.xml' not found with resourceLoader org.codehaus.plexus.resource.loa der.ThreadContextClasspathResourceLoader.
[DEBUG] URLResourceLoader: Exception while searching for 'auth-pmd-rule-set-3.x-v1-5.xml' at '' java.net.MalformedURLException: no protocol: auth-pmd-rule-set-3.x -v1-5.xml
Is there any technical possibility to achieve what I want? I want to redefine the rule set that PMD should use without repeating the entire definition of everything.
source share