Demonstrates using 3rd-party plugins for the jQAssistant Maven plugin and command line utility.

Note
This tutorial is written for version 1.4.0 of jQAssistant.

1. Overview

The functionality of jQAssistant is extensible by plugins which may provide:

Scanners And Models

Scanners and associated models for languages, file formats, history information from version control systems, etc.

Rules

Re-usable rules for sharing between projects, i.e. concepts, constraints and groups.

Reports

Implementations of reports for writing to other file formats, generating diagrams or storing results in databases.

3rd-party plugins are available from the jQAssistant or community or can be implemented if needed (see Resources).

Note
Please refer to the documentation of the plugin for usage details and supported jQAssistant versions.

2. Using A Plugin In A Maven Project

A 3rd-party plugin must be declared as dependency for the jQAssistant Maven plugin:

pom.xml
<plugin>
    <groupId>com.buschmais.jqassistant</groupId>
    <artifactId>jqassistant-maven-plugin</artifactId>
    <version>${jqassistant.version}</version>
    <executions>
        <execution>
            <id>default</id>
            <goals>
                <goal>scan</goal>
                <goal>analyze</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <!-- Plugin specific setup allowing files to be scanned in src/main/asciidoc -->
        <scanIncludes>
            <scanInclude>
                <path>${project.basedir}/src/main/asciidoc</path>
            </scanInclude>
        </scanIncludes>
    </configuration>
    <dependencies>
        <!-- Plugin declaration -->
        <dependency>
            <groupId>de.kontext-e.jqassistant.plugin</groupId>
            <artifactId>jqassistant.plugin.asciidoc</artifactId>
            <version>1.4.1</version>
        </dependency>
    </dependencies>
</plugin>

All detected plugins are logged at startup:

Loaded jQAssistant plugins [Asciidoc, CDI, Common, Core Analysis, Core Report, EJB3, GraphML, JAX-RS, JPA 2, JSON, JUnit, Java, Java 8, Java EE 6, Maven 3, OSGi, RDBMS, Spring, TestNG, Tycho, XML, YAML]
.
Tip
Plugins are resolved from the declared plugin repositories, by default only Maven Central is used. If the plugin is not available there a plugin repository must be declared providing the artifact, for details see Guide to Testing Development Versions of Plugins.

The example above adds the Asciidoc plugin which is part of the jQAssistant plugin suite provided by Kontext E GmbH. It provides a scanner that reads Asciidoc files and stores their structure as graph into the database.

If such files are not located in the default folders scanned by the jQAssistant Maven plugin a scanIncludes section needs to be added.

3. Using A Plugin With The Command Line Utility

The plugin itself and all required dependencies must be provided as JAR files. These files must to be copied to the plugins/ directory of the unzipped jQAssistant command line distribution.

4. Resources