简体   繁体   中英

See Maven Dependencies in Repository Scan (jQAssistant)

I ran a jQAssistant scan on my Maven repository. Now I can see some information, but unfortunately, if I try

MATCH (a:Maven:Artifact) --> (b:Maven:Artifact) RETURN a

I see no results although there should be DEPENDS_ON connections between Artifacts. Is there some extra switch for the scan to also find these arcs?

If you're scanning a Maven repository there are no direct dependencies between artifacts, this is only the case if you're scanning a Maven reactor (ie using the Maven plugin). In case of a repository you have the following structure:

  • (:Repository)-[:CONTAINS_POM]->(:Pom)
  • (:Pom)-[:DESCRIBES]->(:Artifact)
  • (:Pom)-[:DECLARES_DEPENDENCY]->(:Artifact)

The following query returns all Poms, the artifacts which each of them describes and the dependencies that are declared:

MATCH
  (:Repository)-[:CONTAINS_POM]->(pom:Pom),
  (pom)-[DESCRIBES]->(artifact:Artifact),
  (pom)-[:DECLARES_DEPENDENCY]->(dependency:Artifact)
RETURN
  pom.fqn, collect(artifact.name), collect(dependency.fqn)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM