1.9. Headless Check with Sonargraph Build

The following steps describe how Sonargraph Architect Build can be used on the build server to generate a report and let the build fail on specific issue types:

  1. Download and extract Sonargraph Architect Build from the web site https://www.hello2morrow.com/products/downloads .

  2. If you are interested in Ant: Examine the Ant file "crm-domain-example/build/build.xml" and adjust the properties. Run the target "dist".

    If you are interested in Maven: Examine the Maven file "crm-domain-example/pom.xml" and adjust the properties. Run the goal "package" to create the JAR.

  3. Create a workspace profile that uses the created JAR as a target directory.

  4. Open the SonargraphBuild user manual and check how the workspace profile can be specified as a parameter (only available for command-line and Ant integration).

  5. Run the build and adjust the failset: Check for specific issue types only, specific severities, etc.

  6. Let the build fail on architecture violations.

  7. Check the details of those architecture violations in the generated HTML report.

End of Step 8 (step8_crm-domain-example.sonargraph). The provided example uses the Maven plugin. Note: Workspace profiles can be used with the command-line and Ant integrations. Maven and Gradle provide the option to override the Sonargraph workspace and use the source and class roots as present in the Maven and Gradle build.

Related topics: