You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by François-Xavier Busch <fx...@gmail.com> on 2006/02/22 18:39:40 UTC
pmd : how to use custom ruleset ?
Hi,
I try to use the pmd plugin for maven2 but it fails with the error :
Embedded error: Failure executing PMD for: ... MyClass.java
Encountered "{ variable =" at line 13, column 3.
Was expecting one of:
"abstract" ...
"boolean" ...
My class looks like that :
public class MyClass extends AnOtherClass {
{
variable = someValue;
}
}
I know this kind of code is not recommended but I need to keep it. So I
wonder how I can make it work without changing my code.
I try to use a custom ruleset to exclude the rule that seems to trigger the
error :
<rule ref="rulesets/design.xml">
<exclude name="NonStaticInitializer"/>
</rule>
but it doesn't work much better.
If anyone can help !
Thanks.