Skip to content

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

License

Notifications You must be signed in to change notification settings

SymbioseSpA/spring-banner-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Banner Plugin

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

 ____                _                 ____
/ ___|  _ __   _ __ (_) _ __    __ _  | __ )   __ _  _ __   _ __    ___  _ __
\___ \ | '_ \ | '__|| || '_ \  / _` | |  _ \  / _` || '_ \ | '_ \  / _ \| '__|
 ___) || |_) || |   | || | | || (_| | | |_) || (_| || | | || | | ||  __/| |
|____/ | .__/ |_|   |_||_| |_| \__, | |____/  \__,_||_| |_||_| |_| \___||_|
       |_|                     |___/
Version: 1.0, Server: localhost:8080, Active Profiles: none

Usage

<build>
    <plugins>
        <plugin>
            <groupId>ch.acanda.maven</groupId>
            <artifactId>spring-banner-plugin</artifactId>
            <version>1.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}, Server: ${server.address}:${server.port}, Active Profiles: ${spring.active.profiles}</info>
                <version>${project.version}</version>
                <color>default</color>
            </configuration>
        </plugin>
    </plugins>
</build>
  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}, Server: ${server.address}:${server.port}, Active Profiles: ${spring.active.profiles}
Property: banner.info

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

Build Status

Build Status Coverage Status

License

The Spring Banner Plugin is licensed under the Apache License, Version 2.0.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%