Is there a way to configure Sonar or the Sonar Maven plugin to fail the build if a priority is violated (Blocker, Critical)?
you need to determine the warning thresholds for the number of blocking / critical violations (> 0 - your case) in the quality profile and install the plug-in to unlock the assembly (category "Integration" in the Sonar Update Center 2.4).