Skip to content

SonarQube (formerly Sonar) - Steps

Steps

Steps

Process steps in the SonarQube plug-in

Run SonarQube

Run SonarQube to get information about source and tests from SonarQube

if(Boolean.valueOf(createPom) && !automation) { errors.automation = Must Specify a Url if Pom is to be created } if(Boolean.valueOf(createPom) && !srcDir) { errors.srcDir = Must Specify a Source Directory if Pom is to be created } if(Boolean.valueOf(createPom) && !binDir) { errors.binDir = Must Specify an Artifact Directory if Pom is to be created } if(Boolean.valueOf(createPom) && !projName) { errors.projName = Must Specify a Project Name if Pom is to be created } if(Boolean.valueOf(createPom) && !artifactId) { errors.artifactId = Must Specify an Artifact ID if Pom is to be created } if(!Boolean.valueOf(createPom) && ( srcDir || binDir || projName || artifactId)) { errors.srcDir = This must be empty if a POM.xml does not need to be created; errors.binDir = This must be empty if a POM.xml does not need to be created; errors.projName = This must be empty if a POM.xml does not need to be created; errors.artifactId = This must be empty if a POM.xml does not need to be created; }

NameTypeDescriptionRequired
Artifact DirectoryStringRelative path from the Pom file to the directory where artifacts are stored if a Pom file needs to be created.No
Artifact IDStringNo
Create Pom FileBooleanRequired if your project is not a Maven project configured for SonarQubeNo
Exclude DirectoriesStringRelative path to the source to be excluded for static analysis.No
Extra Maven ArgumentsStringExtra arguments to pass to the maven commandlineNo
GroupIdStringThe Maven Group ID to associate this scan with.No
JVM PropertiesStringProperties passed to the JVM (such as adding memory)No
Maven HomeStringThe path to the installation of Maven that will be used. Leave blank to use the Maven on the path.No
Model VersionStringThe Model Version for this scan.No
Project NameStringProject Name to be displayed by SonarQube if a Pom file needs to be created.No
SonarQubeSonarQube server settings. Select if not included in the PomNo
Source DirectoryStringRelative path from the Pom file to directory where source resides if a Pom file needs to be created.No
VersionStringVersion identifier of your artifactNo

Run SonarQube for .NET

Run SonarQube to get information about source and tests from SonarQube for .NET

if(Boolean.valueOf(createPom) && !automation) { errors.automation = Must Specify a Url if Pom is to be created } if(Boolean.valueOf(createPom) && !slnName) { errors.slnName = Must Specify a Solution file (.sln) if Pom is to be created } if(Boolean.valueOf(createPom) && !projName) { errors.projName = Must Specify a Project Name if Pom is to be created } if(Boolean.valueOf(createPom) && !artifactId) { errors.artifactId = Must Specify an Artifact ID if Pom is to be created } if(!Boolean.valueOf(createPom) && ( slnName || projName || artifactId)) { errors.slnName = This must be empty if a POM.xml does not need to be created; errors.projName = This must be empty if a POM.xml does not need to be created; errors.artifactId = This must be empty if a POM.xml does not need to be created; }``

NameTypeDescriptionRequired
Artifact IDStringNo
Create Pom FileBooleanRequired if your project is not a Maven project configured for SonarQubeNo
Exclude DirectoriesStringRelative path to the source to be excluded for static analysis.No
Extra Maven ArgumentsStringExtra arguments to pass to the maven commandlineNo
GroupIdStringThe Maven Group ID to associate this scan with.No
JVM PropertiesStringProperties passed to the JVM (such as adding memory)No
Maven HomeStringThe path to the installation of Maven that will be used. Leave blank to use the Maven on the path.No
Model VersionStringThe Model Version for this scan.No
Project NameStringProject Name to be displayed by SonarQube if a Pom file needs to be created.No
Sln NameStringThe name of the sln file which should be located in the working directory. Only used if Create Pom File is checked. Leave blank to default to the first sln file found in the working directoryNo
SonarQubeSonarQube server settings. Select if not included in the PomNo
Use Debug ConfigurationBooleanNo
VersionStringVersion identifier of your artifactNo

Roles in the SonarQube plug-in

The plug-in adds these roles automatically to resources. You cannot add these roles manually.

SonarQube Server Configuration

NameTypeDescription
Database DriverStringOptionally specify the JDBC driver to use.
Database PasswordPasswordThe password to the SonarQube database (sonar.jdbc.password)
Database UrlStringThe location of the SonarQube Database (sonar.jdbc.url)
Database UsernameStringThe username with credentials to the SonarQube database (sonar.jdbc.username)
SonarQube UrlStringLocation to talk to SonarQube.
SonarQube VersionStringThe version of SonarQube if it is less than 1.8 or want to use a specific version.