Skip to content

slam-it/sonar-quality-gates-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonar Quality Gates Maven Plugin

Build Status Coverage Status Codacy Badge

As of SonarQube version 5.2 SonarSource has discontinued the Build Braker plugin feature. The reason why can be read here: Why You Shouldn’t Use Build Breaker

Description

This plugin will break the maven build if the project fails the quality gate. These checks should happen after analysis has been submitted to the server.

Usage

$ mvn sonar-quality-gates:inspect

Configuration

  • sonarHostUrl
  • The Sonar host url
  • Default: http://localhost:9000

Note: sonarHostUrl property is optional and will be inferred from the sonar.host.url property (in the pom.xml or as a property in a [settings.xml profile](#Example Sonar profile (settings.xml)) if not specified

Example

<build>
  <plugins>
    <plugin>
      <groupId>nl.slam-it.maven</groupId>
      <artifactId>sonar-quality-gates-maven-plugin</artifactId>
      <version>1.0-SNAPSHOT</version>
      <!-- Optional configuration -->
      <configuration>
        <sonarHostUrl>SONAR-HOST-URL</sonarHostUrl>
      </configuration>
    </plugin>
  </plugins>
</build>

Example Sonar profile (settings.xml)

<profile>
  <id>sonar</id>
  <properties>
    <sonar.host.url>http://localhost:9000</sonar.host.url>
    <sonar.jdbc.url>jdbc:postgresql://localhost/sonar</sonar.jdbc.url>
    <sonar.jdbc.username>sonar</sonar.jdbc.username>
    <sonar.jdbc.password>xxxxx</sonar.jdbc.password>
    <sonar.jdbc.driver>org.postgresql.Driver</sonar.jdbc.driver>
  </properties>
</profile>

<activeProfiles>
  <activeProfile>sonar</activeProfile>
</activeProfiles>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages