On 5/10/07, Chris Helck <[EMAIL PROTECTED]> wrote:
In my parent POM I'd like to setup the PMD plugin with a set of rules in
src/site/pmd.xml. In my parent POM I have:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<targetJdk>1.5</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
<rulesets>
<ruleset>${basedir}/src/site/pmd.xml</ruleset>
</rulesets>
</configuration>
</plugin>
The line <ruleset>${basedir}/src/site/pmd.xml</ruleset> causes problems
because a child POM tries to open its own file src/site/pmd.xml which
does not exist. How do I do this?
Can PMD find things on the classpath the way Checkstyle can? In that
case, deploy a jar with your rules, and add it as a build extension so
it's available on the classpath.
${basedir} won't work, it changes for each module. Ther is no
reliable "top" of the project -- some pom hierarchies follow up to a
pom that isn't under your direct control, such as the top-level ASF
pom, or a company-wide parent pom that everyone is required to use.
Relative paths might also work, but then you wouldn't be able to check
out only a piece of the project and still have it build successfully.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]