## watermark

##### Full name:

org.thewonderlemming.c4plantuml:c4plantuml-maven-plugin:1.0.0:watermark

##### Description:

Analyzes the C4 source files found in the output directory adding a watermark footer at the end, allowing the generated diagrams to be identified by a generation date, a version number and so on.

It retrieves the `version`, the `groupId` and the `artifactId` from the `pom.xml` values.

You can find detailed examples on the dedicated examples page.

##### Attributes:

- Requires a Maven project to be executed.
- Binds to a default lifecycle phase: `process-classes`.
- Uses the `project.build.sourceEncoding` property to set the C4 source files encoding.
- Uses the `project.groupId` and `project.artifactId` properties to build a project name if the provided `watermarkName` property is empty.
- Uses the `project.version` property to identify the diagram version.

### Optional parameters

Name | Type | Since | Description
--- | --- | --- | ---
<copyrightName> | `String` | `1.0.0` | A copyright name that can be added to the watermark after the year. Default value is: `""`. Case insensitive: `No`
<sourceFileExtension> | `String` | `1.0.0` | Extension for the C4 source files. Default value is: `.puml` Case insensitive: `Yes`
<watermarkName> | `String` | `1.0.0` | The name of the project to which the C4 source belongs to. Relies on Maven `project.groupId` and `project.artifactId` properties if empty. Default value is: `changeMe`. Case insensitive: `No`
<dateFormat> | `String` | `1.0.0` | The format of the date to display. Visit Java’s documentation for more information on the available patterns. Default value is: `""`

### Parameter details

#### <copyrightName>

A copyright name that can be added to the watermark after the year.

The following snippet sets the value of the `<copyrightName>` to `you`.

    <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>you</copyrightName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

- Type: `java.lang.String`
- Since: `1.0.0`
- Required: `No`
- Default: empty
- Case insensitive: `No`

#### <sourceFileExtension>

Extension for the C4 source files.

The following snippet changes the value of the `<sourceFileExtension>` to `.c4`.

    <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>
                            <sourceFileExtension>.c4</sourceFileExtension>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

- Type: `java.lang.String`
- Since: `1.0.0`
- Required: `No`
- Default: `.puml`
- Case insensitive: `Yes`

#### <watermarkName>

The name of the project to which the C4 source belongs to. Relies on Maven `project.groupId` and `project.artifactId` properties if empty.

The following snippet sets the value of the `<watermarkName>` to `you`.

    <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>you</watermarkName>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

If an empty value is provided, then it will be replaced by `project.groupId:project.artifactId` instead.

- Type: `java.lang.String`
- Since: `1.0.0`
- Required: `No`
- Default: `changeMe`
- Case insensitive: `No`

#### <dateFormat>

The format of the displayed date. The following snippet changes the value of the `<dateFormat>` to `yyyy-MM-dd` (4 digits year, month, day).

    <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>yyyy-MM-dd</dateFormat>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

If an empty value is provided, then the following pattern will be used: `yyyy-MM-dd`.

- Type: `java.lang.String`
- Since: `1.0.0`
- Required: `No`
- Default: ``

More information on the available patterns can be found in the Java documentation , or in the example section.