The Structure101 Key Measures can be reported via SonarQube. The configuration to do this is straight forward and can re-use an existing Structure101 Build configuration file. [Build 14385 of the Structure101 SonarQube plugin]

It is assumed that SonarQube Scanner is already configured within your maven build.

The plugin is installed by copying the sonar-structure101-plugin.jar file to the SonarQube extensions/plugins folder and restarting the SonarQube daemon.

The plugin is configured by adding properties in the project’s maven configuration. The Structure101 Sensor requires the following properties:
structure101.java.classpath
structure101.java.repository
structure101.java.project
or
structure101.java.pom
structure101.java.repository
structure101.java.project
or
structure101.java.headless.config

If you have an existing Structure101 Build configuration file this can be used by the plugin requiring just the structure101.java.headless.config property to be set.

<structure101.java.headless.config>${basedir}\structure101-build-conf.xml</structure101.java.headless.config>

The structure101.java.disabled property should also be set to enable the Structure101 scanner.

<structure101.java.disabled>false</structure101.java.disabled>

The plugin will use the class path, project and repository defined via the configuration file. (see Configuring Structure101 Build for details)

If a build configuration file is not used then the repository and project must be defined.

<structure101.java.repository>c:/structure101-repository</structure101.java.repository>
<structure101.java.project>plugins</structure101.java.project>

The classpath to analyse can be defined as a pom.xml file or as a  standard Java classpath

<structure101.java.pom>${basedir}\pom.xml</structure101.java.pom>

<structure101.java.classpath>${basedir}\target/classes</structure101.java.classpath>


Structure101 Measures

The Structure101 Key Measures can be viewed in the SonarQube web application’s Measures page

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.