I wrote some custom PMD rules in Java (JAVA classes that extends AbstractJavaRule) and I want to use my rules in Sonarqube 4.1.2.
When I was using sonarqube 3.7 I put the rules (.jar) and the extensions.xml file in extensions\rules\pmd, but this solution seem not work with sonarqube 4.1.2
I tried to put the rules in extensions\plugin without success.
So, do you know if there is a solution to use and activate my pmd custom rules with sonarqube 4.1.2 ?
I have not used Sonarqube 4.1.2 but I have tested with Sonar 5.0. I put rules (.jar file) and ruleset (.xml) ito extensions/rules/pmd and it work well.
You may retest it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I wrote some custom PMD rules in Java (JAVA classes that extends AbstractJavaRule) and I want to use my rules in Sonarqube 4.1.2.
When I was using sonarqube 3.7 I put the rules (.jar) and the extensions.xml file in extensions\rules\pmd, but this solution seem not work with sonarqube 4.1.2
I tried to put the rules in extensions\plugin without success.
So, do you know if there is a solution to use and activate my pmd custom rules with sonarqube 4.1.2 ?
And do you know why SonarQube does not want to use PMD anymore ? (the plugin still exists but they developp their own AST lib do write custom rules http://docs.codehaus.org/display/SONAR/Extending+Coding+Rules)
Thanks a lot,
Hello,
I have not used Sonarqube 4.1.2 but I have tested with Sonar 5.0. I put rules (.jar file) and ruleset (.xml) ito extensions/rules/pmd and it work well.
You may retest it.
Hi,
I have tried same steps mentioned above to add custom written java pmd checks. But, those rules are not visible in sonarqube application.
I am using sonarqube 5.1.1
I have added custom jars and xml rule set file to folder <SONAR_HOME>/extensions/rules/pmd.
Thanks in advance,
Rohit