Comments on PlantUML Macro
Last modified by Vincent Massol on 2023/07/03 00:16
Choose the export format from the list below:
Export as Portable Document Format (PDF) using the Web Browser
Export as HyperText Markup Language (HTML)
Note that this macro is quite similar to the YUML Macro
Yes, it is very similar but it's a fully opensource solution and it can be used without any internet access.
Nice macro, I preferred it to YUML Macro for it fully open source side and for large set of diagram supported.
Only one negative point: macro should be done without Graphviz requirement and without external war. It should embed plantUML.jar instead
I did it myself: I made version 0.7 with plantuml.jar embedded.
I'm wrong, Graphviz is mandatory for some diagram; I start with my favourite sequence diagram which doesn't required it.
Very nice that it now supports DITAA diagrams! Well done
Maxime, I've looked briefly at the plantuml project and it seems you can use it embedded by simply copying the plantuml.jar in your Webapp's WEB-INF/lib. Thus it would be very simple to develop a Java Macro that uses plantuml.jar to perform the rendering and thus removing the need for an external server. Is that correct?
Arnaud did this kind of thing with the 0.7 release (see above), except that the plantuml.jar is included as an attachment in one of the 3 pages of the macro, so you don't have to get access to your WEB-INF/lib directory. To use this internal plantuml.jar (that has been updated in 1.1), just leave the URL property empty.
As PlantUML requires the dot Graphviz program to render UML diagrams (except sequence ones), the default configuration using the external server looks easier.
Very nice indeed! I had one problem with v1.1 and my XWiki v3.2 (PlantUML URL: /plantuml/) setup here though: the last line of the macro encodes the URI's slashes to %2F at some point and produces HTML output like this (encoded UML replaced by {encoded-uml} for clarity in the URIs): <img src="/xwiki/wiki/public/download/Main/WebHome/%2Fplantuml%2Fimg%2F{encoded-uml}" style="max-width:100%" alt="/plantuml/img/{encoded-uml}"/>
One workaround was to replace the last line of the macro as such:
//println "[[image:"+serverurl+"img/"+encoded+"||style=\"max-width:100%\"]]"
println "{{html}}<img src=\""+serverurl+"img/"+encoded+"\" alt=\""+serverurl+"img/"+encoded+"\" style=\"max-width:100%;\"/>{{/html}}"
The PlantUML Server URL must be an absolute URL (starting with http://), otherwise it is considered as an attachment by xwiki (see xwiki 2.0 syntax). This must be documented.
Indeed, your workaround is a good improvement, so I created https://jira.xwiki.org/browse/XCONTRIB-138
Very, very nice, BUT: I cannot install the current PlantUML version (1.1) in the current XWiki version (3.2): Importing xwiki-macro-plantuml-1.1.xar: Error while preparing importing
Any help?
Please use the USERS mailing list to ask a question http://dev.xwiki.org/xwiki/bin/view/Community/MailingLists
and take a look at the xwiki.log file to get more information.
Can you please update to latest version of PlantUML jar. Need to use hyperlinks on nodes.
I managed to use hyperlinks using external plantuml server. It won't work with the embedded plantuml.jar. There's some change in the macro it self. Please find in the attached file
Now that a PlantUML server instance is always available at this url http://www.plantuml.com/plantuml/form I think it will be a good idea to use it as the default server of the PlantUML macro and to delete the old PlantUML jar included in it. This will ensure that you use an up-to-date version of PlantUML and the macro will be lighter. And if you are concerned by the privacy of your diagrams, you still can install the PlantUML war on your private server.
What do you think of this idea ?
How do I include links to pages in an activity diagram? I want a flow chart showing step by step how to complete a task, and if the user clicks on one of the steps, it takes them to that page.
It does not work with the latest release (13.8). If I understand correctly, the problem is in Tika lib upgrade in the latest two versions.
The error is the following:
java.lang.NoSuchMethodError: 'void org.apache.tika.io.IOUtils.closeQuietly(java.io.OutputStream)'
at org.xwiki.contrib.plantuml.internal.PlantUMLMacro.executeSync(PlantUMLMacro.java:147)
...
Hello, Can i save diagrams in svg?