jQAssistant 1.2.0 released

jQAssistant 1.2.0 released

3 Kommentare zu jQAssistant 1.2.0 released

The year 2017 is still fresh and we’d like to celebrate it with the release of jQAssistant 1.2.0! It comes with two main changes:

1. New Maven Coordinates

The project has been restructured, i.e. it is now a collection of several sub-projects. The main parts are:

  • Framework
  • Plugins
  • Maven plugin
  • Command line tool

The idea behind is to allow faster release cycles to deliver enhancements or bugfixes more quickly, especially for plugins. From a user’s perspective the following changes are required to upgrade from jQAssistant Maven plugin 1.1.x to 1.2.0:

  • The groupId of the Maven plugin must be changed from „com.buschmais.jqassistant.scm“ to „com.buschmais.jqassistant“
  • All plugins maintained by the jQAssistant project itself are now included as dependency of the Maven plugin, i.e. explicit plugin declarations should be removed

Here is an example for upgrading from jQAssistant 1.1.4…

<plugin>
	<groupId>com.buschmais.jqassistant.scm</groupId> <!-- change to "com.buschmais.jqassistant" -->
	<artifactId>jqassistant-maven-plugin</artifactId>
	<version>1.1.4</version>
	<dependencies>
		<dependency>
			<!-- should be removed -->
			<groupId>com.buschmais.jqassistant.plugin</groupId>
			<artifactId>jqassistant.plugin.graphml</artifactId>
			<version>1.1.4</version>			
		</dependency>
		<dependency>
			<!-- additional 3rd party plugin -->
			<groupId>de.kontext-e.jqassistant.plugin</groupId>
			<artifactId>jqassistant.plugin.git</artifactId>
			<version>1.1.3</version>
		</dependency>			
	</dependencies>
</plugin>

…to jQAssistant 1.2.0:

<plugin>
	<groupId>com.buschmais.jqassistant</groupId> <!-- the new groupId -->
	<artifactId>jqassistant-maven-plugin</artifactId>
	<version>1.2.0</version>
	<dependencies>
		<dependency>
			<!-- additional 3rd party plugin -->
			<groupId>de.kontext-e.jqassistant.plugin</groupId>
			<artifactId>jqassistant.plugin.git</artifactId>
			<version>1.1.3</version>
		</dependency>
	</dependencies>
</plugin>

2. Rule parameters

Concepts and constraints may now define parameters for better re-usability of rules:

Asciidoc example:

[[example:RootPackage]]
[source,cypher,role=concept,requiresParameters="String rootPackage"]
.Labels the root package with `Root`.
----
MATCH
  (root:Package)
WHERE
  root.fqn = {rootPackage}
SET
  root:RootPackage
RETURN
  root as RootPackage
----

XML example:

<concept id="example:RootPackage">
	<requiresParameter name="rootPackage" type="String"/>
	<description>Labels the root package with "Root".</description>
	<cypher><![CDATA[
		MATCH
		  (root:Package)
		WHERE
		  root.fqn = {rootPackage}
		SET
		  root:RootPackage
		RETURN
		  root as RootPackage
	]]></cypher>
</concept>

The defined parameters – rootPackage in this example – must be provided at runtime, i.e. for the Maven plugin…

<plugins>
	<plugin>
		<groupId>com.buschmais.jqassistant</groupId>
		<artifactId>jqassistant-maven-plugin</artifactId>
		<version>1.2.0</version>
		...
		<configuration>
			<ruleParameters>
				<rootPackage>com.buschmais.example</rootPackage>
			</ruleParameters>
		</configuration>
	</plugin>
</plugins>

…and the command line utility:

jqassistant analyze -ruleParameters=parameters.properties

where the file parameters.properties contains the parameter values:

rootPackage=com.buschmais.example

Download and Documentation

The command line distribution is available for download, the release notes provide a complete list of changes and the updated documentation is available online.

Enjoy!

About the author:

@dirkmahler

3 Comments

  1. ronan quillevere  - 16. Februar 2017 - 12:49

    Hi, just found multiple typos & fix needed in the doc related to this release. BTW thank you for the tool :) Keep up the good work !

    http://buschmais.github.io/jqassistant/doc/1.2.0/#_rule_parameters

    You are finishing the xml with instead of

    + accross the doc you have multiple version of the schema (1.0, 1.1 or 1.2), should maybe be the same everywhere ?

    + inside the maven section, groupId has not been updated

    http://buschmais.github.io/jqassistant/doc/1.2.0/#_maven

    • ronan quillevere  - 16. Februar 2017 - 12:50

      xml tag was suppressed from prev msg. So in the rule_parameters your final XML tag is wrong. The slash should be in second position

      • Dirk Mahler  - 17. Februar 2017 - 13:10

        Thanks for the hints, we’ll fix these issues with the next release!

Reply Cancel

Back to Top