Sonar plugin for jDepend
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Ignore IntelliJ files Jul 7, 2017
.travis.yml Update to jdepend fork guru.nidi.jdepend:2.9.5 Mar 28, 2017
LICENSE Initial commit Nov 18, 2016 [#8] Documented workaround to generate files using … Jul 7, 2017 Updated release notes Jul 7, 2017 [#8] Documented workaround to generate files using … Jul 7, 2017
pom.xml [maven-release-plugin] prepare for next development iteration Apr 21, 2017

JDepend plugin for SonarQube Build Status Quality Gate

Requires SonarQube 5.6+ (tested against 5.6, 5.6.5 (LTS), 6.0, 6.1, 6.2 and 6.3)

Uses a fork ( of the JDepend libraries ( version 2.9.1) to add the following rules and metrics to SonarQube:

  • Number of Classes and Interfaces (Rule and Metric)
  • Afferent Couplings (Rule and Metric)
  • Efferent Couplings (Rule and Metric)
  • Abstractness (Rule only)
  • Instability (Rule only)
  • Distance from the Main Sequence (Rule only)
  • Package Dependency Cycle (Rule and Metric)

This plugin depends on the existence of a file in the package to correctly display issues (if no file is present, the issues cannot be registered, as SonarQube only allows issues on existing files). (See Workarounds to generate files using a Maven plugin)

Missing files can be detected and enforced with the following metrics:

  • Number of Packages (Metric)
  • Number of missing files (Metric)


The plugin executes the Jdepend library (packaged within the plugin) during the execution of the SonarQube scanner to scan the binaries, so no extra configuration is needed within the project. The sensor will not be executed if no Jdepend rules have been activated.


Install the plugin via the Update Center in the SonarQube administration pages. Or to install the plugin manually; copy the .jar file from the release to the extensions/plugins directory of your SonarQube installation.