doxygen/plantuml stops to generate UML diagrams

0 votes
asked Aug 11, 2021 in Question / help by Juergen
In one of my projects I use doxygen to create the docs. A while ago I started to embed plantuml diagrams into the generated HTML output. Worked perfectly. But since a few days no diagrams are generated anymore. Doxygen doesn't show any error message regarding plantuml. A few days ago I run an autoupdate of my KDE Neon (Ubuntu based) distribution.

The curious thing is, when I run plantuml manually on a simple testcase in the same folder where I previously run doxygen to create the docs - then all of the "lost" diagrams are generated (including the simple testcase) at once. It looks like the doxygen based diagrams are queued and plantuml waits for some kind of tigger to really create them.

I'm out of ideas what is going wrong now. What information do you need to have an idea at your side?

Regards Juergen

1 Answer

0 votes
answered Aug 11, 2021 by Juergen
Note to myself:

Previously it worked with the Doxygen setting "PLANTUML_JAR_PATH = /path/to/my/plantuml.jar".

Now it works again with "PLANTUML_JAR_PATH = /path/to/my" and the filename must be "plantuml.jar" (not "plantuml.1.2021.9.jar" for example).

Regards Juergen
commented Aug 11, 2021 by albert (3,520 points)

Currently I cannot test plantuml with doxygen, but which version of doxygen are you using? (which version worked, which didn't).

Didn't you get a warning message from doxygen?

Note that the command doxygen -d extcmd shows which external commands are executed

commented Aug 11, 2021 by Juergen
I never saw a plantuml related warning or error message (due too much warnings about my generated documentation…I'm still working on it). Until I run doxygen with:

$ doxygen myproject.doxygen 2>&1

[…]

Running plantuml with JAVA...
Generating PlantUML svg Files in html
Error: Unable to access jarfile /path/to/my/plantuml.jar
error: Problems running PlantUML. Verify that the command 'java -jar "/path/to/my/plantuml.jar" -h' works from the command line. Exit code: 1

With this error message I saw it tried to acces the wrong jar file, since I used "PLANTUML_JAR_PATH = /path/to/my/plantum.1.2021.9.jar" in my configuration. After changing it to "PLANTUML_JAR_PATH = /path/to/my" and renaming the jar file to "plantum.jar" it worked again.

Currently I use:

$ doxygen -v
1.8.17

But sorry, I don't know the doxygen version previously used.

Thanks for the "-d extcmd" parameter hint.
commented Aug 11, 2021 by albert (3,520 points)

The doxygen documentation from 1.8.15, 1.8.17, 1.9.1 (the current version) the documentation says:

PLANTUML_JAR_PATH When using plantuml, the PLANTUML_JAR_PATH tag should be used to specify the path where java can find the plantuml.jar file. If left blank, it is assumed PlantUML is not used or called during a preprocessing step. Doxygen will generate a warning when it encounters a \startuml command in this case and will not generate output for the diagram.

so I think it is possible that the code has been corrected so it reflects the documentation (and with the ...PATH it is not logical to add a jar file to it), I couldn't quickly find the relevant doxygen change in git. I do see some file handling but I don't yet see where the actual change took place.

commented Aug 16, 2021 by albert (3,520 points)
I did some research.

The initial plantuml capabilities were introduced in doxygen 1.8.8 with this version the -d extcmd gives already that the plantuml.jar is used (even when another file name is supplied) but no warning is given (and when the plantuml.jar is not present no image is generated).

With version 1.8.9 the warning is given (and in all following versions).

I tested it on Windows, but I doubt that it is different on other systems.
...