I have a META-INF/services/ file in my project, in order to load a custom Liquibase extension from my project. This lives under src/main/resources.

When using layertools, this ends up in in BOOT-INF/classes/META-INF/services, and not in META-INF/services, meaning Liquibase does not discover the extension via standard Java Service Provider Interface.

Ideally, layertools should keep any META-INF/services/* files so that Java SPI can find them, when using layertools.

Looked around for some configuration and/or solution, but to no avail.

Workaround is to move/copy the files in my Dockerfile

COPY --from=builder application/BOOT-INF/classes/META-INF/services/* ./META-INF/services/

Comment From: snicoll

A Spring Boot repackaged jar is not a regular "library" jar, it is an "application" jar. application/BOOT-INF/classes should be added to the classpath and anything in META-INF/services will be found.

It's hard for me to understand why that's not the case with your application. If you want us to look into it, please share a small sample that we can run ourselves (either a GitHub repo, or a zip with the project).

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: ryanlewis

Will take a look and see if I can repro.

Comment From: spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.