I try do the following:
- I have a standard POM defined for all my Maven2 projects.
- That POM includes the tools to use, and for PMD the rulesets to use.
- I have defined a property that names these rulesets each.
Up to know this is working. I can define a new project POM, use there as parent my standard POM, and use the rulesets there defined. I am even able to override the definition of the property that defines the ruleset by another name.
I have defined that as auth-pmd-rule-set-3.x-v1-5.xml
instead of pmd-rule-set-3.x-v1-5.xml
(which is then choosen by Maven2) and have included the file auth-pmd-rule-set-3.x-v1-5.xml
locally in my new project (under src/main/resources
). But Maven does not find it. The error messages look like that:
[DEBUG] Preparing ruleset: 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] The resource 'auth-pmd-rule-set-3.x-v1-5.xml' was not found with resourceLoader org.codehaus.plexus.resource.loa der.FileResourceLoader.
[DEBUG] The resource 'auth-pmd-rule-set-3.x-v1-5.xml' was not found with resourceLoader org.codehaus.plexus.resource.loa der.JarResourceLoader.
[DEBUG] The resource 'auth-pmd-rule-set-3.x-v1-5.xml' was not found with resourceLoader org.codehaus.plexus.resource.loa der.ThreadContextClasspathResourceLoader.
[DEBUG] URLResourceLoader: Exception when looking 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 technique available to reach what I want? I want to redefine the ruleset PMD should use without repeating the whole definition of everything.