jQAssistant 1.8.0 released
jQAssistant 1.8.0 released
29. Januar 2020 Keine Kommentare zu jQAssistant 1.8.0 releasedFirst of all we hope you had a good start into 2020! Maybe it we can make it even a little a bit better with our latest 1.8.0 release.
Asciidoc Report Plugin
If you place your rules into asciidoc files the plugin will automatically pickup an existing index.adoc and render it (with all included asciidoc files) to HTML documents and embed the results of executed rules. These may be reported as
- embedded tables (default)
- embedded component, class or sequence diagrams (using PlantUML)
- links to external reports, like CSV or GraphML files
This means that you can write a documentation that contains all the concepts and constraints of your architecture which is executed at build time and its output will always be up-to-date.
This is our contribution to close the gap between code and documentation, taking the Docs-As-Code idea to the next level!
More information on the plugin and its capabilities is available from the manual.
Note that if you already used this plugin from the jQAssistant contrib area you’ll need to remove it from your Maven or command line setup during migration.
Enhancements to the Maven Plugin
A often asked feature was the possibility to include declared dependencies of a Maven project into a scan.
This can be achieved by passing properties to the scanner:
<plugin> <groupId>com.buschmais.jqassistant</groupId> <artifactId>jqassistant-maven-plugin</artifactId> <version>1.8.0</version> <executions> <execution> <id>default-cli</id> <goals> <goal>scan</goal> <goal>analyze</goal> </goals> <configuration> <scanProperties> <maven3.dependencies.scan>true</maven3.dependencies.scan> <maven3.dependencies.includes>org.springframework*:*:*</maven3.dependencies.includes> </scanProperties> </configuration> </execution> </executions> </plugin>
Furthermore it is now possible to scan URLs from a Maven project:
<plugin> <groupId>com.buschmais.jqassistant</groupId> <artifactId>jqassistant-maven-plugin</artifactId> <version>1.8.0</version> <executions> <execution> <id>default-cli</id> <goals> <goal>scan</goal> <goal>analyze</goal> </goals> <configuration> <scanIncludes> <scanInclude> <!-- This activates scanning of Maven Central repository. Don't try this at home, you have been warned! But maybe it's worth having a look at your company's artifact repository (Nexus or Artifactory)? --> <url>https://repo1.maven.org/repo2</url> <scope>maven:repository</scope> </scanInclude> </scanIncludes> </configuration> </execution> </executions> </plugin>
Improved Spring Plugin
The Spring rules for enforcing best practices have been enhanced such that more injectable types (e.g. @SpringBootApplication) are now detected and less false-positive constraint violations are reported. Just give it a try:
<plugin> <groupId>com.buschmais.jqassistant</groupId> <artifactId>jqassistant-maven-plugin</artifactId> <version>1.8.0</version> <executions> <execution> <id>default-cli</id> <goals> <goal>scan</goal> <goal>analyze</goal> </goals> <configuration> <groups> <group>spring-boot:Strict</group> <!-- or spring-boot:Default for more relaxed checks --> </groups> </configuration> </execution> </executions> </plugin>
Neo4j and plugin libraries
The embdedded Neo4j version has been upgraded to 3.5.14.
Furthermore the APOC and Graph Algorithms libraries have been removed from the main distribution, they are now released as separate plugin libraries:
jQAssistant APOC plugin
jQAssistant Graph Algorithms plugin
Plugin developers should note that this release comes with some changes that might be breaking but are straight forward to resolve. For more information refer to the release notes and this issue.
XML Schemas
Life has become easier for those who want to create their own plugins, e.g. for sharing rules between projects as the required XML schemas are now available online.
For creating an XML file containing rules just use the following template in your favorite IDE and it will provide validation and suggestions:
<jqassistant-rules xmlns="http://schema.jqassistant.org/rule/v1.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.jqassistant.org/rule/v1.8 https://schema.jqassistant.org/rule/jqassistant-rule-v1.8.xsd"> </jqassistant-rules>
This works for the plugin descriptor as well:
<jqassistant-plugin xmlns="http://schema.jqassistant.org/plugin/v1.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schema.jqassistant.org/plugin/v1.8 https://schema.jqassistant.org/plugin/jqassistant-plugin-v1.8.xsd" name="My Plugin"> </jqassistant-plugin>
Distributions, Release Notes and Examples
Users of the Maven plugin just need to update the jQAssistant version in their pom.xml file:
<plugin> <groupId>com.buschmais.jqassistant</groupId> <artifactId>jqassistant-maven-plugin</artifactId> <version>1.8.0</version> ... </plugin>
The command line distribution is available for download here
A full list of changes is available in the Release Notes.
If you’re looking for examples refer to the Spring PetClinic and Piggy Metrics applications.
Leave a comment