I fail to find out how to set up jqassistant-maven-plugin to verify the rules in the java plugin on a multi-module maven project.
There is not a lot in the jqassistant documentation about how to configure a plugin. Also I do not see what goal I have to run in order to see some report with the result of the java rules analysis.
I added this to my root pom.xml
<plugin>
<groupId>com.buschmais.jqassistant</groupId>
<artifactId>jqassistant-maven-plugin</artifactId>
<version>1.9.0</version>
<configuration>
<useExecutionRootAsProjectRoot>true</useExecutionRootAsProjectRoot>
</configuration>
<dependencies>
<dependency>
<groupId>com.buschmais.jqassistant.plugin</groupId>
<artifactId>java</artifactId>
<version>1.9.0</version>
</dependency>
</dependencies>
</plugin>
When I execute
- mvn clean install
- mvn jqassistant:scan
- mvn jqassistant:analyze
Never do I see anything that looks like some output from jqassistant, except for a xml file that does not contain anything usefull:
<?xml version="1.0" encoding="UTF-8"?>
<jqassistant-report xmlns="http://schema.jqassistant.org/report/v1.8"></jqassistant-report>
When I run mvn jqassistant:effective-rules it always gives the following result:
[INFO] Groups [0]
[INFO] Constraints [0]
[INFO] Concepts [0]
Anyone who has a working example?
jQAssistant comes with a very limited set of rules that can be applied out-of-the-box for verifying common mistakes (i.e. constraints). As of that the Java plugin mainly provides concepts that may be used if creating your own constraints.
There's one exception to it and that's the Spring plugin. It comes with a set of constraints to enforce best practices if working with the Spring Framework. Nevertheless the constraints need to be activated, the best way to do it is to activate one of the groups
spring-boot:Defaultorspring-boot:Strict:(see https://101.jqassistant.org/getting-started-spring-boot-maven/)