sonar-quality-gates-maven-plugin

This plugin will break the maven build if the project fails the sonarqube quality gate

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.hack23.maven
ArtifactId

ArtifactId

sonar-quality-gates-maven-plugin
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

sonar-quality-gates-maven-plugin
This plugin will break the maven build if the project fails the sonarqube quality gate
Project URL

Project URL

https://github.com/Hack23/sonar-quality-gates-maven-plugin
Project Organization

Project Organization

www.hack23.com
Source Code Management

Source Code Management

https://github.com/Hack23/sonar-quality-gates-maven-plugin

Download sonar-quality-gates-maven-plugin

How to add to project

<plugin>
    <groupId>com.hack23.maven</groupId>
    <artifactId>sonar-quality-gates-maven-plugin</artifactId>
    <version>1.0.5</version>
</plugin>

Dependencies

compile (9)

Group / Artifact Type Version
com.mashape.unirest : unirest-java jar 1.4.9
com.google.guava : guava jar 28.2-jre
org.apache.httpcomponents : httpclient jar 4.5.12
org.apache.httpcomponents : httpasyncclient jar 4.1.4
org.apache.httpcomponents : httpmime jar 4.5.12
org.codehaus.plexus : plexus-utils jar 3.3.0
org.apache.commons : commons-lang3 jar 3.9
com.fasterxml.jackson.core : jackson-databind jar 2.10.3
com.fasterxml.jackson.core : jackson-annotations jar 2.10.3

provided (4)

Group / Artifact Type Version
javax.inject : javax.inject jar 1
org.apache.maven : maven-plugin-api jar 3.6.3
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.6.0
org.apache.maven : maven-core jar 3.6.3

test (5)

Group / Artifact Type Version
junit : junit jar 4.13
org.apache.maven.plugin-testing : maven-plugin-testing-harness jar 3.3.0
org.apache.maven : maven-compat jar 3.6.3
com.openpojo : openpojo jar 0.8.13
org.mockito : mockito-core jar 3.3.3

Project Modules

There are no modules declared in this project.

Sonar Quality Gates Maven Plugin

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.

Recommend using [https://github.com/adnovum/sonar-build-breaker], easier to integrate with sonarqube.

Origin

Fork of https://github.com/slam-it/sonar-quality-gates-maven-plugin, added support for sonarqube 7.9.x, migrated package to com.hack23.maven released to maven central.

Badges

license Maven Central Jenkins Jenkins tests Coverage Lines of Code Technical Debt Quality Gate Black Duck Security Risk FOSSA Status

Runtime

[JDK-8] [JDK-11 or higher] [JDK-12] [JDK-13]

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>com.hack23.maven</groupId>
      <artifactId>sonar-quality-gates-maven-plugin</artifactId>
      <version>1.0-SNAPSHOT</version>
      <!-- Optional configuration -->
      <configuration>
        <sonarHostUrl>SONAR-HOST-URL</sonarHostUrl>
        <sonarLogin>(username ore token)</sonarLogin>
        <sonarPassword>(password if username used, not when using token)</sonarPassword>
      </configuration>
    </plugin>
  </plugins>
</build>

Example Sonar profile (settings.xml)

<profile>
  <id>sonar</id>
  <properties>
    <sonar.host.url>http://localhost:9000</sonar.host.url>
    <sonar.login>(username ore token)</sonar.login>
    <sonar.password>(password if username used, not when using token)</sonar.password>
  </properties>
</profile>

<activeProfiles>
  <activeProfile>sonar</activeProfile>
</activeProfiles>
com.hack23.maven

www.hack23.com

Development of Secure Open Source Software Applications and Tools.

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0