The following steps describe how Sonargraph-Build can be used on the build server to generate a report and let the build fail on specific issue types:
-
Download and extract Sonargraph-Build from the web site https://www.hello2morrow.com/products/downloads .
-
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.
-
Create a workspace profile that uses the created JAR as a target directory.
-
Open the Sonargraph-Build user manual and check how the workspace profile can be specified as a parameter (only available for command-line and Ant integration).
-
Run the build and adjust the failset: Check for specific issue types only, specific severities, etc.
-
Let the build fail on architecture violations.
-
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: