additionalPlantUMLConfigs

Description

With the help of this configuration parameter you are able to add any PlantUML configuration or even normal text to the beginning of the generated PlantUML diagram. The parameter is a list of strings and every string is a new line in the PlantUML diagram.

If this parameter is not added or if the parameter is an empty list, nothing is added to the diagram.

Default value

The default value for this configuration is an empty list.

Example

In the following example there are three dependencies in the maven dependency hierarchy which build the classpath for all further generation:

	<dependencies>
		<dependency>
			<groupId>de.elnarion.util</groupId>
			<artifactId>plantuml-generator-util</artifactId>
			<version>@project.version@</version>
			<classifier>tests</classifier>
			<type>test-jar</type>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.16.1</version>
		</dependency>
		<dependency>
			<groupId>javax.persistence</groupId>
			<artifactId>javax.persistence-api</artifactId>
			<version>2.2</version>
		</dependency>				
	</dependencies>

From this classpath all classes of the package "de.elnarion.test.domain.t0023", which are also used by the JUnit-tests of the PlantUML generator utility, should be generated as class diagram with the following plugin configuration

			<plugin>
				<artifactId>plantuml-generator-maven-plugin</artifactId>
				<groupId>de.elnarion.maven</groupId>
				<version>@project.version@</version>
				<executions>
					<execution>
						<id>generate-simple-diagram</id>
						<goals>
							<goal>generate</goal>
						</goals>
						<phase>process-test-resources</phase>
						<configuration>
							<outputFilename>testdiagram1.txt</outputFilename>
							<scanPackages>
								<scanPackage>de.elnarion.test.domain.t0023</scanPackage>
							</scanPackages>
							<additionalPlantUmlConfigs>
								<additionalPlantUmlConfig>left to right direction</additionalPlantUmlConfig>
								<additionalPlantUmlConfig>scale 2/3</additionalPlantUmlConfig>
							</additionalPlantUmlConfigs>
						</configuration>
					</execution>
				</executions>
			</plugin>

this configuration contains two additionalPlantUMLConfig entries:

  • left to right direction - which sets the direction in which the image is rendered to left to right

  • scale 2/3 - which scales the image to two third of the original size

This configuration is rendered this way:

0023_additional-plant-uml-configs_diagram

and produces this PlantUML diagram text:

@startuml

left to right direction
scale 2/3

class de.elnarion.test.domain.t0023.BaseAbstractClass {
	{method} +doSomething () : void
	{method} +doSomethingElse () : void
	{method} +doSomethingWithParameter ( paramString1 : String ) : void
	{method} +doSomethingWithReturnValue () : String
}

interface de.elnarion.test.domain.t0023.BaseInterface {
	{method}  {abstract} +doSomething () : void
	{method}  {abstract} +doSomethingWithParameter ( paramString1 : String ) : void
	{method}  {abstract} +doSomethingWithReturnValue () : String
}

class de.elnarion.test.domain.t0023.ChildA {
}

class de.elnarion.test.domain.t0023.ChildB {
}

class de.elnarion.test.domain.t0023.Util {
}

de.elnarion.test.domain.t0023.BaseAbstractClass ..|>  de.elnarion.test.domain.t0023.BaseInterface
de.elnarion.test.domain.t0023.ChildA --|>  de.elnarion.test.domain.t0023.BaseAbstractClass
de.elnarion.test.domain.t0023.ChildB -->  de.elnarion.test.domain.t0023.Util : util
de.elnarion.test.domain.t0023.ChildB --|>  de.elnarion.test.domain.t0023.BaseAbstractClass

@enduml