You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

The Blueriq Model Analyzer consists out of three components: Blueriq Sonar Plugin, Blueriq Sonar Scanner, Blueriq Sonar Quality Gate. This page will explain how to install and setup all of these component.

Installation requirements

All of the components require the Java to be available on the machine from where the components are ran. You can either install Java with a Java Installer, which makes Java globally available on your system, or you can extract Java to a specific folder. This installation manual will provide information for both options. Make sure you download the correct Java version (32/64bit). See the Blueriq Model Analyzer Platform Support page which version of Java is support for your Blueriq Model Analyzer version.

Blueriq Sonar Plugin

The Blueriq Sonar Plugin is a plugin for SonarQube, which makes it possible to perform an analysis on you Blueriq Models created in the Blueriq Studio. The Blueriq Sonar Plugin needs to be placed inside a SonarQube instance. This manual will provide information on how to install SonarQube and how to place the Blueriq Sonar Plugin in the correct directory of Sonarqube so it becomes available.

Installing Sonarqube

Download SonarQube from https://www.sonarqube.org/downloads/.

Select the supported version mentioned in Blueriq Model Analyzer Platform Support, and store it on your machine. Unzip the downloaded zip-file to the destination folder of your choice. The contents of the unzipped folder should look like this:

Configuring Java

If you do not Java globally available on your system, you will need to set the path to the installation directory of Java. This can be done by editting the wrapper.conf file which is located in the conf directory of your SonarQube installation folder. 

Below is an example of how the wrapper.conf should look when you Java installation folder is located here: C:\Program Files\Java\jdk-11.0.2

wrapper.conf
# Path to JVM executable. By default it must be available in PATH.
# Can be an absolute path, for example:
#wrapper.java.command=/path/to/my/jdk/bin/java
wrapper.java.command=C:/Program Files/Java/jdk-11.0.2/bin/java

...

Installing Blueriq Sonar Plugin in Sonarqube

The Blueriq Sonar Plugin called bma-sonar-plugin.jar needs to be placed inside the installation directory of SonarQube. Navigate to the subdirectory extensions/plugin inside the installation directory of SonarQube, and copy the bma-sonar-plugin.jar into the directory.

Only copy the bma-sonar-plugin.jar to extensions/plugin. If any non SonarQube plugin jars are placed into the extensions/plugin directory, Sonarqube will to start.

Running SonarQube

When the Blueriq Sonar Plugin is in place, start the SonarQube service by running the StartSonar.bat in the subdirectory of the bin folder corresponding to your operating system. For instance /sonarqube-5.6.6/bin/windows-x86-x64


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.

Setting up configuration

Setting up a default configuration can be done through the SonarQube administration options. We have some suggestions for Setup in an enterprise landscape.

You will have to create the pom.xml yourself, and then configure it for your own Blueriq installation, repository, branch and project(s).

Below, you can find

  • An example of a pom.xml
  • The location where to save the pom.xml
  • An explanation of the properties in the pom.xml

An example configuration in this pom file looks like this:

Example
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>SingleModule</groupId>
  <artifactId>singlemodule-test</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>SingleModuleTest</name>
  
    <properties>
        <sonar.blueriq.managementservice>http://my-studio-server/Studio/Server/Services/ManagementService</sonar.blueriq.managementservice>
        <sonar.blueriq.repository>RubikTest</sonar.blueriq.repository>
        <sonar.blueriq.branch>Trunk</sonar.blueriq.branch>
        <sonar.blueriq.projects>Kinderbijslag,TestProject</sonar.blueriq.projects>
        <sonar.blueriq.username>admin</sonar.blueriq.username>
        <sonar.blueriq.password>welcome</sonar.blueriq.password>
        <sonar.blueriq.authentication>BASIC</sonar.blueriq.authentication>
        <sonar.blueriq.skipanalysis>false</sonar.blueriq.skipanalysis>
        <sonar.blueriq.workingDir>target/bq</sonar.blueriq.workingDir>
    </properties>
</project>


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.



  • No labels