1

I'm new to jQAssistant, and I like it very much. However, I'm not interested in having any data of dependencies outside our company in the Neo4j database.

So far, I haven't found any means to exclude JARs from being scanned when they're found in a WAR's lib directory.

Am I missing something?

Or as an alternative: Can I remove all the data that's not coming from our code from the Neo4j database?

eerriicc
  • 1,124
  • 4
  • 17
  • 29

1 Answers1

1

There is a very experimental (and therefore not yet documented) property for the file scanner plugin that allows filtering files during scan but functionality is quite limited. Assuming that you're scanning using the command line utility:

  1. Create a file scan.properties with the following content:

file.include=*.war,*.jar,/org/springframework/**

The first pattern includes your WAR file, the second all contained jar files (within the WAR), the last one your desired packages (in this case org.springframework).

  1. Execute the CLI

jqassistant -p scan.properties -f application.war

The alternative (i.e. deleting all nodes from JARs that you're not interested in) is not feasible, as it would turn out to be a quite expensive query.

But it could make sense to think the other way round: just add a label to all the JAR archives that you're interested in, e.g.

MATCH (jar:Jar) WHERE jar.fileName starts with "/WEB-INF/lib/spring-" SET jar:Internal RETURN jar.fileName

Then you can use that label in queries for your Java types:

MATCH (:Internal:Jar)-[:CONTAINS]->(type:Type) RETURN type.fqn

Dirk Mahler
  • 1,186
  • 1
  • 6
  • 7