So the goal here is to be able to discern what version of my app someone (ops) is using. In debugging they are using the wrong version but it would have been a lot easier to tell if Spring Boot was simply logging the artifact information. This is essentially the same objective as https://stackoverflow.com/q/54083990/206466 where I'm trying to do it myself; but I think this would be a nice feature in 2.2. This needs to be logged as early as possible so that it happens before other significant logic/chance of failure can happen.

Comment From: snicoll

This is already possible using the MANIFEST. Have you considered using ${application.version} in a custom banner?

Comment From: xenoterracide

I hadn't but I will now, however I think this info (even if done this way) would be incredibly useful without customization. I will note that out of the box that the filename is printed, but one of the issues is person was renaming said file to be more generic, making it harder to debug the issue.

note: maybe this should be print manifest info

Comment From: xenoterracide

my MANIFEST doesn't have that information out of the box

Calebs-MBP:META-INF calebcushing$ cat MANIFEST.MF 
Manifest-Version: 1.0
Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: com.potrero.Application
Calebs-MBP:libs calebcushing$ cd BOOT-INF/classes/META-INF/
Calebs-MBP:META-INF calebcushing$ ls
build-info.properties
Calebs-MBP:META-INF calebcushing$ cat build-info.properties 
#Properties
#Tue Jan 08 11:21:35 CST 2019
build.version=0.1.7-1-g9b8c165-SNAPSHOT
build.group=com.potrero
build.name=predictive-health-service-app
build.artifact=predictive-health-service-app
build.time=2019-01-08T17\:21\:32.778198Z

Comment From: snicoll

One more time, please do not use the issue tracker for questions. If you need help to configure your build to add this entry, ask on StackOverflow.

Comment From: xenoterracide

sorry, we finally just got it, it's why I pinged you on gitter though I was trying not to. Ok

tasks.withType<BootJar>().configureEach {
    enabled = true
    manifest {
        attributes(
            "Implementation-Version" to project.version
        )
    }
}

I had to add this in order to make it work, should I reword this request to

include this information in the manifest by default, and print it as part of the banner? as I think this would be useful for debugging out of the box apps. If including app version information on boot for debugging is not something the team thinks would be useful to ops/devs for their apps, we can close as that's the request. If the idea with implementation as described is liked, I can try to implement it if desired.

Comment From: snicoll

I don't think we should add more information by default to the banner. The current infrastructure is flexible enough to add more if needed and that includes the version of the app using the manifest.

Comment From: mvmn

How can I get property like build.group in the banner? Or anything from BuildInfo?