JQassistant commandline report task is not generating asciidoc html files

136 Views Asked by At

Love the idea behind this tool, but I'm struggling with the documentation.

I am trying to generate a report of jar files using the commandline.

When I run ./bin/jqassistant.sh:

  • scan, I see the generated associated neo4j store
  • analyze produces jqassistant/reports/jqassistant-report.xml
  • report produces jqassistant-report.html

Now I'm trying to create asciidoc files as described here: https://101.jqassistant.org/generate-reports-about-structures-and-metrics/index.html

I've placed an index.adoc file in jqassistant folder, but I do not see any corresponding html files generated in jqassistant/reports/asciidoc/

I'm new to jqassistant, so it's possible I am missing a configuration step, but I have a suspicion the asciidoc-report plugin is not being loaded.

Is there clear documentation on all the parameters to pass to commandline, including any configuration files such as .jqassisant.yml?

I created a file jqassistant/index.adoc

:toc: left
= My Project

// tag::default[]
[[default]]
== jQAssistant Rules

This section describes that default rules that are executed during each build.
// end::default[]


I ran /bin/jqassistant.sh analyze /bin/jqasisstant.sh report

I expected to see a file in jqassistant/report/asciidoc/index.html

1

There are 1 best solutions below

0
Ugur Kurnaz On

Finally achieved to have it working ... partially. I used the tutorial project mentioned in the question.

First, I used version 1.12.2 (latest v1), it's also the versions (even if direct link is to v1.11.1) that is linked by JQA Get Started

Most plugins seems to be missing from v2 core distribution, maybe still in migration progress, it's best to stick to v1 for command line uses. one need additional configuration to re-enable them (in.jqassistant.yml file).

Then, after detailled reading of User Manual, I finally got what's wrong!!

rules directory doesn't default to same value in CLI and in MVN plugin.

so with the command line one can change the lookup directroy for rules as :

jqassistant scan analyze -f java:classpath::target/classes -r jqassistant

you can also copy the rules (index.adoc, module.adoc, report.adoc, ...) in the subfolder jqassistant/rules.

index.adoc is beeing processed. but there are still missing configurations. Indeed class diagram remains empty. It has to do with a missing concept in CLI that is matched against in module.adoc:

MATCH
  (:Main:Artifact)-....

unfortunately there is no :Main concept in the store. I thought it may require scanning jar file (with MainClass) but same thing when scanning the jar instead of classes folder.

Short asnwer there are differences between CLI and MVN in default configuration. And unfortunately documentation is not precise enough to know which configuration one should do to make CLI work as MVN plugin.