Watermarking sources
Using the watermark goal will generate a footer in your C4 source files, enabling your readers to know if they are looking to the latest version of a diagram at first sight.
Below are some examples of configurations along with the expected graphical result. You can find more about the watermark goal there.
Using default watermark
<version>42.0-RC1</version>
...
<build>
<plugins>
<plugin>
<groupId>org.thewonderlemming.c4plantuml</groupId>
<artifactId>c4plantuml-maven-plugin</artifactId>
<version>1.0.0-RC1</version>
<executions>
<execution>
<id>watermarking-c4-files</id>
<goals>
<goal>watermark</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Supposing that the goal is executed in 2020 on January 2nd, the produced watermark will look like:
Version 42.0-RC1 - Generated on 2020-01-02 - ©2020
changeMe
Adding a watermark name
<groupId>org.example.c4</groupId>
<artifactId>my-shiny-project</artifactId>
<version>42.0-RC1</version>
...
<build>
<plugins>
<plugin>
<groupId>org.thewonderlemming.c4plantuml</groupId>
<artifactId>c4plantuml-maven-plugin</artifactId>
<version>1.0.0-RC1</version>
<executions>
<execution>
<id>watermarking-c4-files</id>
<goals>
<goal>watermark</goal>
</goals>
<configuration>
<watermarkName>my-project-view</watermarkName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Supposing that the goal is executed in 2020 on January 2nd, the produced watermark will look like:
Version 42.0-RC1 - Generated on 2020-01-02 - ©2020
my-project-view
Setting the value of the watermarkName property to empty will result into using your project project.groupId and project.artifactId properties values instead:
<groupId>org.example.c4</groupId>
<artifactId>my-shiny-project</artifactId>
<version>42.0-RC1</version>
...
<build>
<plugins>
<plugin>
<groupId>org.thewonderlemming.c4plantuml</groupId>
<artifactId>c4plantuml-maven-plugin</artifactId>
<version>1.0.0-RC1</version>
<executions>
<execution>
<id>watermarking-c4-files</id>
<goals>
<goal>watermark</goal>
</goals>
<configuration>
<watermarkName></watermarkName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Supposing that the goal is executed in 2020 on January 2nd, the produced watermark will look like:
Version 42.0-RC1 - Generated on 2020-01-02 - ©2020
org.example.c4:my-shiny-project
Adding a copyright name
<version>42.0-RC1</version>
...
<build>
<plugins>
<plugin>
<groupId>org.thewonderlemming.c4plantuml</groupId>
<artifactId>c4plantuml-maven-plugin</artifactId>
<version>1.0.0-RC1</version>
<executions>
<execution>
<id>watermarking-c4-files</id>
<goals>
<goal>watermark</goal>
</goals>
<configuration>
<copyrightName>acme</copyrightName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Supposing that the goal is executed in 2020 on January 2nd, the produced watermark will look like:
Version 42.0-RC1 - Generated on 2020-01-02 - ©2020 acme
changeMe
Changing the date format
<version>42.0-RC1</version>
...
<build>
<plugins>
<plugin>
<groupId>org.thewonderlemming.c4plantuml</groupId>
<artifactId>c4plantuml-maven-plugin</artifactId>
<version>1.0.0-RC1</version>
<executions>
<execution>
<id>watermarking-c4-files</id>
<goals>
<goal>watermark</goal>
</goals>
<configuration>
<dateFormat>yy/MM/dd</dateFormat>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Supposing that the goal is executed in 2020 on January 2nd, the produced watermark will look like:
Version 42.0-RC1 - Generated on 20/01/02 - ©2020
<version>42.0-RC1</version>
...
<build>
<plugins>
<plugin>
<groupId>org.thewonderlemming.c4plantuml</groupId>
<artifactId>c4plantuml-maven-plugin</artifactId>
<version>1.0.0-RC1</version>
<executions>
<execution>
<id>watermarking-c4-files</id>
<goals>
<goal>watermark</goal>
</goals>
<configuration>
<dateFormat>u/MM/dd Q</dateFormat>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Supposing that the goal is executed in 2020 on January 2nd, the produced watermark will look like:
Version 42.0-RC1 - Generated on 2020/01/02 1 - ©2020


