Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

PUML Maven Plugin

A Maven Plugin for generating diagrams from PlantUML sources

Run tests SonarCloud quality gate SonarCloud vulnerability count SonarCloud technical debt Dependabot Status Mutation testing badge Maven Central


Add the plugin to your POM.

        <!-- described below -->
        <!-- described below -->

The plugin needs two additional dependencies:

  1. An adapter for PlantUML
  2. PlantUML itself

For example:


Finally, you can configure the plugin using the standard Maven plugin mechanism. Details are below.

The integration tests contain more examples which are verified with each build of the plugin.


This plugin provides one goal.

generate — Generates diagrams from a set of input files.

This goal takes a set of input files and generates a diagram for each of them. You can configure the goal using these parameters:

Input The set of input files as a FileSet
Name sourceFiles
Property plantuml.sourceFiles
Required? yes
Default value -
Output Where to place generated diagrams.
Name outputDirectory
Property plantuml.outputDirectory
Required? no
Default value ${}/plantuml
Path stripping A path to strip from each input file before building the output file name
Name stripPath
Property plantuml.stripPath
Required? yes
Default value -
Output format Format the diagrams should be generated in.
Name format
Property plantuml.format
Required? yes
Default value -
Values PNG, SVG

Path stripping

The plugin will remove the stripPath parameter from each input file name and then create the output file name from the remainder of the input file name.

To understand what this means, consider this example. Imagine an input file src/main/docs/diagrams/architecture/overview.puml and the default output directory, ${}/plantuml. Without path stripping, the output file would be ${}/plantuml/src/main/docs/diagrams/architecture/overview.puml. Path stripping lets you strip a part of the input file name, so the output location will be shorter.

In the above example, a value of src/main/docs for the stripPath parameter would result in the following output file: ${}/plantuml/diagrams/architecture/overview.puml.

PlantUML Adapters

To accommodate for changing versions of PlantUML, this plugin requires you to add an adapter. It is the adapters job to abstract the actual invocation of PlantUML. This should keep the plugin API stable regardless of which version of PlantUML you want to use.

A plugin does not pull in the actual version of PlantUML. This gives you the flexibility to specify the exact version of PlantUML you want to use in your project.

Development notes

Releases must be built with Java 8 and Maven 3.x (not 4.x at the time of writing). This is due to Maven 4's build/consumer, where the distributed POM is different from the one on disk. The Maven GPG Plugin isn't aware of this yet and signs the wrong POM...


Do you have an idea for this plugin, or want to report a bug? All contributions are welcome! Feel free to file an issue with your idea, question or whatever it is you want to contribute.


The PUML Maven Plugin is licensed under the Apache License, version 2. See LICENSE for the full text of the license.


Maven Plugin for generating diagrams from PlantUML sources







No packages published