PlantUML Maven Plugin :: Parent

Maven Plugin for generating diagrams from PlantUML sources

License

License

Categories

Categories

UML Business Logic Libraries Documents Processing
GroupId

GroupId

it.mulders.puml
ArtifactId

ArtifactId

puml-parent
Last Version

Last Version

0.2
Release Date

Release Date

Type

Type

pom
Description

Description

PlantUML Maven Plugin :: Parent
Maven Plugin for generating diagrams from PlantUML sources
Project URL

Project URL

https://github.com/mthmulders/puml-maven-plugin
Source Code Management

Source Code Management

https://github.com/mthmulders/puml-maven-plugin

Download puml-parent

Filename Size
puml-parent-0.2.pom 17 KB
Browse

How to add to project

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

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

  • maven-plugin
  • plantuml-api
  • plantuml-v1-adapter
  • tests

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