We are wondering if it is possible to create a custom Java rule to check that pom.xml name matches with a internal cmdb database.
There are several rules packaged in the SonarJava plugin under “org.sonar.java.checks.xml.maven” but when we try to create rules the same way in a custom java rules plugin the rules are never used.
This seems to be caused because the SonarJava plugin embeds its own XmlFileSensor that loads all those xml checks. In our custom plugin we cannot create a new XmlFileSensor because we get the “unsatisfied dependency error on sensor initialization” so our rules are never loaded for execution.
Is there a way to extend the java plugin with new maven xml checks?