The variable ${application.version} does not render in a customer banner file. The same file works in version 2.2.2.

The application.version and application.title variables aren't being read from META-INF/MANIFEST.MF.

Comment From: mbhave

@norman-abramovitz Can you provide a minimal sample that we can run to reproduce the issue? It can be a link to a GitHub repository or a zip attached here.

Comment From: norman-abramovitz

Hopefully, I chose a good example that shows the issue.

The application variables are not coming through.

Please be aware I had to do some markdown formatting to get the text below to display correctly.

git clone https://github.com/spring-guides/gs-spring-boot.git cd gs-spring-boot

# create a resources directory and add the application. properties file and banner.txt

ESDIR="initial/src/main/resources" mkdir ${RESDIR} cat >${RESDIR}/application.properties <<-EOF SPRING_BANNER_LOCATION=file:/banner.txt EOF

cat >${RESDIR}/banner.txt <<-EOF banner 4 banner 4 banner 4 banner 4 banner 4 banner 4 banner 4

Application Name : \\${application.title} Application Version : \\${application.version} Application Formatted Version : \\${application.formatted-version} Spring Boot Version : \${spring-boot.version} Spring Boot Formatted Version : \\${spring-boot.formatted-version} EOF

cd initial ./gradlew bootRun

# kill the server after it stops outputting and scroll backward to look at the banner output # I expected to see the application variables to have values.

Comment From: bclozel

I've tried reproducing this by following your instructions and I'm getting:

Spring Boot 2.2.2:

banner 4
banner 4
banner 4
banner 4
banner 4
banner 4
banner 4

Application Name :
Application Version :
Application Formatted Version :
Spring Boot Version : 2.2.2.RELEASE
Spring Boot Formatted Version :  (v2.2.2.RELEASE)

Spring Boot 2.3.0:

banner 4
banner 4
banner 4
banner 4
banner 4
banner 4
banner 4

Application Name :
Application Version :
Application Formatted Version :
Spring Boot Version : 2.3.0.RELEASE
Spring Boot Formatted Version :  (v2.3.0.RELEASE)

I don't see any change in behavior here. Note that the SPRING_BANNER_LOCATION= should use the expected properties format spring.banner.location:, and is not needed here as we're using the default value anyway.

As far as I know, the extra information in META-INF is not added by default by the Spring Boot Gradle plugin.

Adding the following in the Gradle build:

bootJar {
    manifest {
        attributes('Implementation-Title': project.name, 'Implementation-Version': project.version)
    }
}

Works for both 2.2.2 and 2.3.0:

Application Name : spring-boot
Application Version : 0.0.1-SNAPSHOT
Application Formatted Version :  (v0.0.1-SNAPSHOT)
Spring Boot Version : 2.3.0.RELEASE
Spring Boot Formatted Version :  (v2.3.0.RELEASE)

Maybe something is missing here? Could you provide a complete project reproducing the problem? Even with a very simple application and some directions, it's really easy to forget important information as it's the case here.

Comment From: philwebb

I wonder if this one is related to #21705?

Comment From: spring-projects-issues

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

Comment From: norman-abramovitz

The issue was caused by changing from maven builds to gradle builds.