The Spring Banner Plugin is a Maven plugin generating the banner that is printed on start up of a Spring Boot application.
____ _ ____
/ ___| _ __ _ __(_)_ __ __ _| __ ) __ _ _ __ _ __ ___ _ __
\___ \| '_ \| '__| | '_ \ / _` | _ \ / _` | '_ \| '_ \ / _ \ '__|
___) | |_) | | | | | | | (_| | |_) | (_| | | | | | | | __/ |
|____/| .__/|_| |_|_| |_|\__, |____/ \__,_|_| |_|_| |_|\___|_|
|_| |___/
Version: 1.6.0, Server: localhost:8080, Active Profiles: none<build>
<plugins>
<plugin>
<groupId>ch.acanda.maven</groupId>
<artifactId>spring-banner-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>generate-spring-banner</id>
<phase>generate-resources</phase> <!--(1)-->
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration> <!--(2)-->
<text>${project.name}</text>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<filename>banner.txt</filename>
<includeInfo>true</includeInfo>
<info>Version: ${application.version:${project.version}}, Server: ${server.address:localhost}:${server.port:8080}, Active Profiles: ${spring.profiles.active:none}</info>
<font>standard</font>
<color>default</color>
<useNonBreakingSpace>false</useNonBreakingSpace>
</configuration>
</plugin>
</plugins>
</build>-
The default phase is
generate-resources. This can be omitted unless you want to generate the banner in another phase. -
All configuration parameters are optional. The values in this example are the default values.
All parameters are optional.
- text
-
The banner text.
Default value:${project.name}
Property:banner.text - outputDirectory
-
The directory of the banner file.
Default value:${project.build.outputDirectory}
Property:banner.outputDirectory - filename
-
The name of the banner file.
Default value:banner.txt
Property:banner.filename - includeInfo
-
true(default): include the info line
false: do not include the info line
Property:banner.includeInfo - info
-
The line to print under the banner when
includeInfoistrue.
Default value:Version: ${application.version:${project.version}}, Server: ${server.address:localhost}:${server.port:8080}, Active Profiles: ${spring.profiles.active:none}
Property:banner.info - font
-
The FIGlet font to be used for the banner. This can either be the name of a built-in font, or a path to a custom FIGlet font file (.flf).
Available built-in fonts:banner,big,block,bubble,digital,ivrit,lean,mini,mnemonic,script,shadow,slant,small,smscript,smshadow,smslant,standard,term.
Custom fonts must be prefixed withfile:and should be referenced using the full path, e.g.<font>file:${project.basedir}/fonts/chunky.flf</font>. Relative paths are relative to the working directory. The font file is only needed during compile time and does not need to be included in the final jar.
Default value:standard
Property:banner.font - color
-
The color of the banner. Valid values are:
default,black,red,green,yellow,blue,magenta,cyan,white,bright black,bright red,bright green,bright yellow,bright blue,bright magenta,bright cyanandbright white.
Default value:default
Property:banner.color - useNonBreakingSpace
-
If set to
true, then all spaces are replaced with non-breaking spaces.
DefaultValue:false
Property:banner.useNonBreakingSpace
The Spring Banner Plugin is licensed under the Apache License, Version 2.0.