1

In a (multi module, but that shouldn't matter here) Maven project, the jqassistant-maven-plugin is configured as follows:

<configuration>
  <failOnViolations>true</failOnViolations>
  <severity>crititical</severity>
  <groups>
    <group>tests</group>
  <groups>
</configuration>

Some constraints group is configured like this:

<group id="tests" severity="major">
  <includeConstraint refId="rules:TestClassName" />
  <includeConstraint refId="rules:TestMethodName" />
  <includeConstraint refId="rules:TestClassOrMethodIgnored" />
</group>

When running the build (or executing the jqassistant:analyze goal), the constraints of the tests group do not seem to be executed - or, at least, their results are not reported, like they are, when setting <severity> to major. The documentation does not explicitly mention this kind of behaviour.

So: does jQAssistant silently drop constraints with a severity lower than the one configured for the Maven plugin, or does it just hide the violations? And - is there a way to have it show even violations of constraints with a lower severity?

ngc4579
  • 43
  • 7

1 Answers1

0

The constraints are executed but will not be reported on the Maven or commandline console if the severity is lower than the configured one.

The file "jqassistant-report.xml" contains the results and can be transformed into an HTML document (e.g. by executing the Maven goal jqassistant:report).

BTW: The next release will provide deprecate the options "severity" and "failInViolations" and replace them with "warnOnSeverity" and "failOnSeverity" which should make the behavior more clear.

Dirk Mahler
  • 1,186
  • 1
  • 6
  • 7