This plugin implements SCM dependent features of SonarQube for Mercurial projects.
Auto-detection will works if there is a .hg folder in the project root directory. Otherwise you can force the provider using -Dsonar.scm.provider=hg.
The plugin doesn't use Hg4j because it is not available on Maven central.