PlantUML Maven Plugin :: PlantUML v1 Adapter

Adapter for using any PlantUML version that starts with 1.x.y.

License

License

Categories

Categories

Ant Build Tools UML Business Logic Libraries Documents Processing
GroupId

GroupId

it.mulders.puml
ArtifactId

ArtifactId

plantuml-v1-adapter
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

jar
Description

Description

PlantUML Maven Plugin :: PlantUML v1 Adapter
Adapter for using any PlantUML version that starts with 1.x.y.

Download plantuml-v1-adapter

How to add to project

<!-- https://jarcasting.com/artifacts/it.mulders.puml/plantuml-v1-adapter/ -->
<dependency>
    <groupId>it.mulders.puml</groupId>
    <artifactId>plantuml-v1-adapter</artifactId>
    <version>0.2</version>
</dependency>
// https://jarcasting.com/artifacts/it.mulders.puml/plantuml-v1-adapter/
implementation 'it.mulders.puml:plantuml-v1-adapter:0.2'
// https://jarcasting.com/artifacts/it.mulders.puml/plantuml-v1-adapter/
implementation ("it.mulders.puml:plantuml-v1-adapter:0.2")
'it.mulders.puml:plantuml-v1-adapter:jar:0.2'
<dependency org="it.mulders.puml" name="plantuml-v1-adapter" rev="0.2">
  <artifact name="plantuml-v1-adapter" type="jar" />
</dependency>
@Grapes(
@Grab(group='it.mulders.puml', module='plantuml-v1-adapter', version='0.2')
)
libraryDependencies += "it.mulders.puml" % "plantuml-v1-adapter" % "0.2"
[it.mulders.puml/plantuml-v1-adapter "0.2"]

Dependencies

compile (1)

Group / Artifact Type Version
it.mulders.puml : plantuml-api jar 0.2

provided (2)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.18
net.sourceforge.plantuml : plantuml jar [1.2017.12,2.0)

test (5)

Group / Artifact Type Version
org.assertj : assertj-core jar 3.19.0
org.junit.jupiter : junit-jupiter-engine jar
org.junit.jupiter : junit-jupiter-params jar
org.mockito : mockito-core jar 3.8.0
ch.qos.logback : logback-classic jar 1.2.3

Project Modules

There are no modules declared in this project.

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

Usage

Add the plugin to your POM.

<plugin>
    <groupId>it.mulders.puml</groupId>
    <artifactId>plantuml-maven-plugin</artifactId>
    <version>0.1</version>
    <dependencies>
        <!-- described below -->
    </dependencies>
    <configuration>
        <!-- described below -->
    </configuration>
</plugin>

The plugin needs two additional dependencies:

  1. An adapter for PlantUML
  2. PlantUML itself

For example:

    <dependencies>
        <dependency>
            <groupId>it.mulders.puml</groupId>
            <artifactId>plantuml-v1-adapter</artifactId>
            <version>@project.version@</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.plantuml</groupId>
            <artifactId>plantuml</artifactId>
            <version>1.2020.9</version>
        </dependency>
    </dependencies>

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.

Goals

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 ${project.build.directory}/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, ${project.build.directory}/plantuml. Without path stripping, the output file would be ${project.build.directory}/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: ${project.build.directory}/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...

Contributing

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.

License

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

Versions

Version
0.2
0.1