Adding custom java rule to pmd maven plugin -
i've wrote custom rule pmd (in java). want rule executed in project. i've added rule pmd.xml:
<rule name="myrule" message="some message" class="myrule"> <description> description </description> <properties> <property name="someproperty" value="1" /> </properties> <priority>3</priority> </rule>
and there problem appeared. didn't know place rule definition - myrule.class. trying add maven dependency pmd:
<dependency> <groupid>pmd.rules</groupid> <artifactid>customjavarules</artifactid> <version>1.0</version> </dependency>
where customjavarules jar artifact (from local "file://" repo) containing myrule.class. jar found , loaded myrule.class still invisible pmd.
i trying place class in various directories... poor results.
has ever had similar problem?
solved:
<dependency> <groupid>pmd.rules</groupid> <artifactid>customjavarules</artifactid> <version>1.0</version> <scope>system</scope> <systempath>path/to/my/jar/customjavarules.jar</systempath> </dependency>
Comments
Post a Comment