Riduidel / aadarchi

A maven archetype to generate easily projects allowing architecture description using a mix of C4, agile architecture, Asciidoc and PlantUML
https://riduidel.github.io/aadarchi/
Apache License 2.0
39 stars 12 forks source link

For elements added to model during maven discovery, the description is used instead of technology #373

Closed Riduidel closed 10 months ago

Riduidel commented 10 months ago

If you look current produced container diagram, some of the containers are added with incorrect technology defined.

Sans titre

Riduidel commented 10 months ago

So, if I look into diagram source, I get

  Container(Aadarchi.sipocdiagramgenerator, "sipoc-diagram-generator", "Generates SIPOC (suppliers/inputs/process/outputs/consumers) diagrams in an asciidoc table, for each element.", $tags="")

And if I look into C4-PlantUML documentation, I can see that in Container diagram, technology is optional, but is defined before documentation.

Moreover, if I add a random technology text in the sipoc-diagram-generator, the text correctly appears as technology, and description is visible at the description place.

So problem seems two-fold.

Riduidel commented 10 months ago

The second part seems to be due to the fact that no interesting dependency is found in the module. As a consequence we don't add Java as a technology, which in turn makes the technology string empty, which finally results in the string not being added to PlantUML and the rendering failing.

Riduidel commented 10 months ago

Okay ... it seems like hard injection of language was a mistake. Indeed, to inject Java language, I first checked if some dependnecies were present and used that as an indicator of Java usage. But it fails miserably when no dependency is important enough. The method I will now use will be significantly harder.

  1. Detect if some language runtime is detected in dependencies (by checking if dependency has the "language" tag)
  2. If none is found, add a fake Java dependency (with the version) and link it to a fake mvnrepository artifact -the artifact will be created by https://github.com/Riduidel/aadarchi-technology-detector/issues/5