Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpacked Spring Boot applications don't show version on startup #21705

Closed
frzme opened this issue Jun 4, 2020 · 1 comment
Closed

Unpacked Spring Boot applications don't show version on startup #21705

frzme opened this issue Jun 4, 2020 · 1 comment
Assignees
Labels
type: bug A general bug
Milestone

Comments

@frzme
Copy link

frzme commented Jun 4, 2020

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?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 4, 2020
@philwebb
Copy link
Member

philwebb commented Jun 5, 2020

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.

@philwebb philwebb added the for: team-attention An issue we'd like other members of the team to review label Jun 5, 2020
@philwebb philwebb self-assigned this Jun 5, 2020
@philwebb philwebb added type: bug A general bug and removed for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged labels Jun 5, 2020
@philwebb philwebb added this to the 2.3.x milestone Jun 5, 2020
philwebb added a commit that referenced this issue Jun 5, 2020
@philwebb philwebb modified the milestones: 2.3.x, 2.3.1 Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants