jQAssistant 1.1.4 released
jQAssistant 1.1.4 released
14. November 2016 Keine Kommentare zu jQAssistant 1.1.4 releasedA new jQAssistant release 1.1.4 is now available from Maven central and as downloadable ZIP distribution, the release notes are available here. Beside an upgrade to Neo4j. 2.3.7 it mainly contains bugfixes but also brings some enhancements which shall be summarized here.
Generic file pattern support
It is now possible to provide „include“ and „exclude“ file patterns for scanning. An example would be excluding all libraries while a scanning WAR, therefore a file „scan.properties“ with the following content needs to be created:
file.exclude=/WEB-INF/lib/*
This file can be passed to the command line as follows:
jqassistant.sh scan -p scan.properties -f web-application.war
XML-file patterns
There are already several plugins for scanning specific XML file types (e.g. persistence.xml). It is now possible to specify file patterns as scanner properties (see above) to the generic XML file scanner to include XML files which are not explicitly supported, e.g.
xml.file.include=/META-INF/ejb-jar.xml,/META-INF/weblogic-ejb-jar.xml
For these files a generic XML representation will be created (see documentation), e.g.:
MATCH (xmlFile:Xml:File{fileName:"/META-INF/ejb-jar.xml"})-[:HAS_ROOT_ELEMENT]->(root:Element), (root)-[:HAS_ELEMENT]->(enterpriseBeans:Element{name:"enterprise-beans"}), (enterpriseBeans)-[:HAS_ELEMENT]->(bean:Element), (bean)-[:HAS_ELEMENT]->(ejbClass:Element{name:"ejb-class"})-[:HAS_TEXT]->(ejbClassName:Text) RETURN xmlFile.fileName, collect(ejbClassName.value)
Field constants
A Java class may declare constants, e.g.
public class MyClass { public static final String FOO = "bar"; }
Thanks to a contribution from the community these values are now available in the graph (in a similar way to annotation values):
MATCH (t:Type)-[:DECLARES]->(f:Field)-[:HAS]->(value:Value:Primitive) RETURN t.fqn, f.name, value.value
Weight of DEPENDS_ON relations
The scanner for Java classes now adds an attribute „weight“ to DEPENDS_ON relations which represents the count of occurrences a referenced type:
MATCH (t1:Type)-[d:DEPENDS_ON]->(t2:Type) RETURN t1.fqn, t2.fqn, d.weight ORDER BY d.weight desc
Leave a comment