spring-banner-plugin icon indicating copy to clipboard operation
spring-banner-plugin copied to clipboard

A Maven plugin that generates the banner for a Spring Boot Application

= Spring Banner Plugin :plugin-version: 1.6.0 :idprefix: :idseparator: -

The Spring Banner Plugin is a Maven plugin generating the banner that is printed on start up of a Spring Boot application.

[source,subs="attributes+"]


/ | _ __ _ __() __ __ | __ ) __ _ _ __ _ __ ___ _ __ _ | '_ | '| | '_ \ / | _ \ / _ | ' | '_ \ / _ \ '| ) | |) | | | | | | | (| | |) | (| | | | | | | | __/ | |/| .__/|| ||| ||_, |/ _,|| ||| ||_|| || |_/ Version: {plugin-version}, Server: localhost:8080, Active Profiles: none

== Usage

image::https://maven-badges.herokuapp.com/maven-central/ch.acanda.maven/spring-banner-plugin/badge.svg["Maven Central",link="https://search.maven.org/artifact/ch.acanda.maven/spring-banner-plugin"]

[source,xml,subs="attributes+"]

ch.acanda.maven spring-banner-plugin {plugin-version} generate-spring-banner generate-resources generate ${project.name} ${project.build.outputDirectory} banner.txt true Version: ${application.version:${project.version}}, Server: ${server.address:localhost}:${server.port:8080}, Active Profiles: ${spring.profiles.active:none} standard default false ----

<1> The default phase is generate-resources. This can be omitted unless you want to generate the banner in another phase. <2> All configuration parameters are optional. The values in this example are the default values.

=== Configuration Parameters

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 includeInfo is true. + 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 with file: 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 cyan and bright 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

== Requirements

You need to run Maven with Java 17 to use the plugin.

== Build Status

image:https://github.com/acanda/spring-banner-plugin/actions/workflows/build.yaml/badge.svg["GitHub Actions Build Status",link="https://github.com/acanda/spring-banner-plugin/actions/workflows/build.yaml"] image:https://coveralls.io/repos/github/acanda/spring-banner-plugin/badge.svg?branch=main["Coverage Status",link="https://coveralls.io/github/acanda/spring-banner-plugin?branch=main"] image:https://sonarcloud.io/api/project_badges/measure?project=acanda_spring-banner-plugin&metric=alert_status["Sonar Quality Gate Status",link="https://sonarcloud.io/dashboard?id=acanda_spring-banner-plugin"] image:https://sonarcloud.io/api/project_badges/measure?project=acanda_spring-banner-plugin&metric=security_rating["Sonar Security Rating",link="https://sonarcloud.io/component_measures?id=acanda_spring-banner-plugin&metric=Security&view=list"] image:https://sonarcloud.io/api/project_badges/measure?project=acanda_spring-banner-plugin&metric=reliability_rating["Sonar Reliability Rating",link="https://sonarcloud.io/component_measures?id=acanda_spring-banner-plugin&metric=Reliability&view=list"] image:https://sonarcloud.io/api/project_badges/measure?project=acanda_spring-banner-plugin&metric=sqale_rating["Sonar Maintainability Rating",link="https://sonarcloud.io/component_measures?id=acanda_spring-banner-plugin&metric=Maintainability&view=list"] image:https://sonarcloud.io/api/project_badges/measure?project=acanda_spring-banner-plugin&metric=vulnerabilities["Sonar Vulnerabilites",link="https://sonarcloud.io/project/issues?id=acanda_spring-banner-plugin&resolved=false&types=VULNERABILITY"] image:https://sonarcloud.io/api/project_badges/measure?project=acanda_spring-banner-plugin&metric=bugs["Sonar Bugs",link="https://sonarcloud.io/project/issues?id=acanda_spring-banner-plugin&resolved=false&types=BUG"]

== License

The Spring Banner Plugin is licensed under the http://www.apache.org/licenses/LICENSE-2.0[Apache License, Version 2.0].