When running a fatjar spring boot app packaged with maven by the spring boot plugin the application version is shown on startup (as read from manifest file)

When layers are extracted using layertool (like described here https://spring.io/blog/2020/01/27/creating-docker-images-with-spring-boot-2-3-0-m1) and the application is then run unpacked no version is shown.

Can the version information be retained with unpacked layers?

Comment From: philwebb

This one is quite interesting. The entries are retained in the manifest but they're unfortunately not getting set on the defined packages. The reason for this is the URLClassLoader doesn't load manifests for folders.

We've either got to try and make the URLClassLoader think that contents of BOOT-INF/classes is actually a jar (and have a special implementation of it), or we've got to update our LaunchedURLClassLoader to somehow set the values when definePackage is called.