Fork me on GitHub

Plugin Documentation

Goals available for this plugin:

Goal Description
sonar-quality-gate:check Check project status in SonarQube and fail build, if quality gate is not passed
sonar-quality-gate:help Display help information on sonar-quality-gate-maven-plugin.
Call mvn sonar-quality-gate:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3
JDK 11
Memory No minimum requirement.
Disk Space No minimum requirement.
SonarQube (by mode) 5.3+ (integrated) / 5.4+ (simple) / 7.7+ (advanced)

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>io.github.r0bb3n</groupId>
          <artifactId>sonar-quality-gate-maven-plugin</artifactId>
          <version>1.3.0</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>io.github.r0bb3n</groupId>
        <artifactId>sonar-quality-gate-maven-plugin</artifactId>
        <version>1.3.0</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"