Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Install requirements

 


Install Java

Java needs to be installed on the machine on which analysis will be carried out. To make sure Java is installed on your machine, you can open a command prompt and type

...

If Java is installed you will be prompted with the installed Java version, like this: 


If Java is not installed on your machine, you can download it from https://java.com/nl/download/  and follow instructions  from there.

...

Code Block
languagevb
themeMidnight
titleAdministrator: Command Prompt
setx path "%path%;<maven installation location>\bin"

...


Install Blueriq Model Analyzer for Sonarqube

...

Note

Only place the bma-sonar-plugin.jar in this directory otherwise SonarQube won't start.

...


Configure Maven POM file

Finally, Maven and SonarQube need to be configured with the correct properties to be able to read your Blueriq Model of interest. Maven takes care of this by reading a pom.xml file.

...


The correctly configured pom file needs to be placed inside the directory in which Maven’s root directory is installed, for instance:

 


The properties in the pom file:

PropertyRequiredDefaultDescription

sonar.blueriq.managementservice

Required for managementservice 

Url to the management service, if this property is set then all other managementservice properties must also be set. If this is not set, then the branchexportlocation must be set.

sonar.blueriq.repository

Required for managementservice 

Name of the repository.

sonar.blueriq.branch

Required for managementservice 

Name of the branch.

sonar.blueriq.username

Required for managementservice 

Studio username credential.

sonar.blueriq.password

Required for managementservice 

Studio password credential.

sonar.blueriq.domainOptional 
Studio authentication domain, only applicable if the authentication property is set to NTLM_CUSTOM.
sonar.blueriq.authenticationRequired for managementservice 
Studio authentication mode, currently BASIC and NTLM_CUSTOM are supported
sonar.blueriq.branchexportlocationRequired for export file 
Location of a branch export zip from the studio, if this is set then the managementservice property must not be set.

sonar.blueriq.projects

Required 

A comma separated list of blueriq project names.

sonar.blueriq.workingDirRequired 
Relative path inside the executing directory where the BMA plugin creates files to index issues and measures.
sonar.blueriq.skipanalysisOptionalfalse

Set to true if the BMA plugin shouldn't be triggered for the current project. This is useful when scanning projects without Blueriq, or when no connection can be made to the management service.

...


The following properties are default SonarQube properties. More information can be found here.

PropertyRequiredDefaultDescription

sonar.host.url

Optional

localhost:9000

Url and port to the sonarQube host.

sonar.projectKeyOptional when using Maven 
The key for the SonarQube project. In case of Maven the default is based on the Maven project name.
sonar.projectNameOptional when using Maven 
The name of the SonarQube project. In case of Maven the default is based on the Maven project name.
sonar.branchOptional
Use when importing the results of a feature branch to SonarQube.

...


The installation is now completed. You should be able to analyse your Blueriq Models now.

 

Q&A

1. The mvn sonar plugin throws an exception when scanning a java/c# project with only the property sonar.blueriq.skipanalysis set to true. What do i do?

Awnser: Currenlty there is a bug in the BMA which also requires the sonar.blueriq.branchexportlocation to also be set. When this bug is fixed only sonar.blueriq.skipanalysis should be required.