@Mojo(name="validate-qualitygate",
aggregator=true)
public class SonarMavenBuildBreakerMojo
extends org.apache.maven.plugin.AbstractMojo
Created by Vandeperre Maarten on 29/04/2016.
| Modifier and Type | Field and Description |
|---|---|
protected String |
branchName |
static int |
FIVE_MINUTES_IN_SECONDS |
protected org.apache.maven.project.MavenProject |
project |
protected String |
qualityGateName |
protected String |
sonarExecutionStart |
protected String |
sonarKey |
protected String |
sonarPassword |
protected String |
sonarServer |
protected String |
sonarUser |
| Constructor and Description |
|---|
SonarMavenBuildBreakerMojo() |
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Validate a project against a given quality gate.
|
public static final int FIVE_MINUTES_IN_SECONDS
@Parameter(property="sonar.host.url",
required=true)
protected String sonarServer
@Parameter(property="sonar.projectKey") protected String sonarKey
@Parameter(property="sonar.branch") protected String branchName
@Parameter(property="sonar.login",
required=true)
protected String sonarUser
@Parameter(property="sonar.password",
required=true)
protected String sonarPassword
@Parameter(property="sonar.execution.start") protected String sonarExecutionStart
@Parameter(property="sonar.qualitygate",
required=true)
protected String qualityGateName
@Component protected org.apache.maven.project.MavenProject project
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException - will not be thrown.org.apache.maven.plugin.MojoFailureException - whll be thrown when the quality gate is not met by the given project.Copyright © 2016. All rights reserved.