[build.plantuml]¶
External PlantUML renderer settings shared by every builder.
Each builder also has a plantuml table of its own, such as
[build.html.plantuml], so the executable can be named once here for
the whole project. A builder’s own table inherits every key it does not
set from [build.plantuml] and wins on every key it does,
enabled = false included.
ubCode can draw the needuml and needarch views, the authored uml /
plantuml directives (and their MyST {uml} / {plantuml} fences), and
— when needflow / needsequence are set — the needflow and
needsequence views, by running a PlantUML
executable you install and maintain, instead of converting them to Mermaid.
It is off by default, and the live preview always uses the Mermaid
conversion.
These keys can be written once in [build.plantuml] for every output
format, or in one format’s own table such as [build.html.plantuml], which
inherits every key it does not set from [build.plantuml] and wins on every
key it does, enabled = false included.
PlantUML 1.2026.2 or newer is required. Older releases accept the
command-line options this feature relies on and then ignore them, so the
diagram it produced would not be under the controls described here.
ubCode always sets PlantUML’s SANDBOX profile, as a JVM property and in
the environment. That is a safe default rather than a guarantee: the
executable is yours, and what you put in command can relax it — a later
-DPLANTUML_SECURITY_PROFILE=UNSECURE, a wrapper script that re-exports the
profile, or an entry that strips the environment. That is your explicit
choice: ubCode does not diagnose which of the two PlantUML prefers, and
cannot contain what PlantUML then reads.
Guide: Sharing the renderer between builders.
- build.plantuml.command¶
- Type:
- array of strings
- Default:
[]
The
PlantUMLexecutable to run, written as a command and its arguments.Always a list, never a single string. For a JAR give the launcher and the JAR —
["java", "-jar", "/opt/plantuml.jar"]— and put any JVM options (-Xmx512m) before-jar; for a wrapper script or a native build, one entry is enough.The FIRST entry is the program: a bare name is looked up on
PATH, and one containing a path separator is taken relative to thisubproject.toml. Every entry after it is passed through EXACTLY as written.To point at a file beside this
ubproject.toml, write{config_dir}and ubCode replaces it with that directory — anywhere in any entry, as often as you like:["java", "-jar", "{config_dir}/libs/plantuml.jar"]. Nothing else in an argument is rewritten, so a container image name, aKEY=VALUEpair or a URL reaches your program unchanged.Required when the renderer is enabled — a command that cannot be run is reported as the build warning
build.plantuml_exec_failed, and so is an unset or empty one.ubCode always runs
PlantUMLunder itsSANDBOXprofile, and what you write here can relax it: a later-DPLANTUML_SECURITY_PROFILE=UNSECUREargument, or a wrapper script that re-exports the profile before startingPlantUML. That is your explicit choice — ubCode does not diagnose whetherPlantUMLprefers the property or the environment, cannot contain whatPlantUMLthen reads, andPlantUML’s own allowlist confines neither..nor symbolic links.
- build.plantuml.enabled¶
- Type:
- boolean
- Default:
false
Render
PlantUMLdiagrams with an externalPlantUMLexecutable instead of converting them to Mermaid.Applies to the
needuml/needarchviews and the authoreduml/plantumldirectives in the built output, and to theneedflow/needsequenceviews when their own keys are also set. Defaults to false, which leaves each builder to draw the diagram itself — in the HTML site, as the Mermaid conversion. The live preview always uses the Mermaid conversion, so an enabled project’s diagrams can look different in the preview than on the built page. Writing this table without setting this key leaves the renderer off.
- build.plantuml.min_version¶
- Type:
- string
- Default:
""
The oldest
PlantUMLversion this project accepts.Written the way
PlantUMLwrites it,1.2026.4, and checked once per build against the version the executable reports. Below it the renderer is switched off for that build with the warningbuild.plantuml_version_unsupportedand the diagrams fall back to what the builder draws without the renderer (in the HTML site, the Mermaid conversion).This can only RAISE the bar: it cannot be set below the built-in minimum of
1.2026.2, and a lower value is reported as the build warningbuild.plantuml_exec_failedand ignored in favour of that minimum. An executable whose reported version cannot be read at all is reported asbuild.plantuml_version_unparsedand not used, since there is then no version to check against the minimum.Diagram appearance can change between
PlantUMLreleases, so upgrading can change how your diagrams look. Unset or""means1.2026.2.
- build.plantuml.needflow¶
- Type:
- boolean
- Default:
false
Also draw the
needflowviews with the externalPlantUMLexecutable.Needs
enabledas well: this key chooses which diagrams the renderer draws, never whether there is one, soneedflow = trueon its own changes nothing. Defaults to false in both builders, which draws everyneedflowthe way ubCode draws it today (in the HTML site, as a client-side Mermaid flowchart; in the PDF, as a box showing the diagram source).This is a FIDELITY setting: the diagram is laid out by
PlantUMLitself, the way a Sphinx-Needs build withneeds_flow_engine = "plantuml"lays it out, and each node becomes a link to its need. Some intents cannot be carried over exactly —:direction: upand:direction: leftare drawn on their axis mate, a typestylethat is not aPlantUMLkeyword is drawn as a rectangle, andstyle_start/style_endare ignored.[needs] flow_engineis the low-precedence default for this key, so aubproject.tomlshared with a Sphinx-Needs build need not say the same thing twice. A diagram’s own:engine:option overrides both, in either direction. The live preview always uses the Mermaid conversion, whatever this says.
- build.plantuml.needsequence¶
- Type:
- boolean
- Default:
false
Also draw the
needsequenceviews with the externalPlantUMLexecutable.Needs
enabledas well, exactly asneedflowdoes, and defaults to false in both builders. A separate key fromneedflowbecause a project may well want its traceability graph drawn byPlantUMLand its message diagrams left as they are.[needs] flow_enginedoes NOT drive this key. Sphinx-Needs’ ownneedsequenceisPlantUML-only and has no engine option at all, so the key that chooses between engines has nothing to say about this family.With it off, a
needsequenceis the Mermaid sequence diagram ubCode draws itself (a box showing that source, in the PDF). With it on, it is laid out byPlantUML. The live preview always uses the Mermaid conversion, whatever this says.
- build.plantuml.timeout¶
- Type:
- integer
- Default:
60
How long the whole diagram-rendering step may take, in seconds.
The bound covers the single run that renders every diagram needing an update, not each diagram. Diagrams that produced no output when it expires are reported as the build warning
build.plantuml_timeoutand fall back to what the builder draws without the renderer (in the HTML site, the Mermaid conversion). Defaults to 60;0is refused asbuild.plantuml_exec_failed.