Building UML Diagrams using Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
ctrl + p
settings
"plantuml.server": "http://localhost:8080",
"plantuml.render": "PlantUMLServer"
$ docker pull plantuml/plantuml-server
$ docker run -d -p 8080:8080 plantuml/plantuml-server:tomcat
If using jetty server then
$ docker run -d -p 8080:8080 plantuml/plantuml-server:jetty
http://localhost:8080.
You may get an error for instance if port 8080
is used by another app e.g jenkins
Follow these steps to change the jenkins server port to something else like port 8181
You can go to /etc/default/jenkins i.e sudo gedit /etc/default/jenkins
add --httpPort=8181
or whatever port to JENKINS_ARGS e.g change wherever there appears 8080
to 8181
Then you should restart Jenkins with sudo service jenkins restart
The PlantUML images are served over http://
and you should allow your preview to include data from unsafe sources.
Press ctrl + shift + P
Example Rendered Document
To test it out create an example.md
file with PlantUML content.
The image is rendered on the fly
$ pip install pandoc-plantuml-filter
$ pandoc -f markdown -t html example.md -o example.html --filter pandoc-plantuml
Created directory plantuml-images
Created image plantuml-images/402741d387c62ca584eaab62c916046351ed658f.svg
The PlantUML binary must be in your $PATH
or can be set with the PLANTUML_BIN
environment variable.