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

Add support for Spring Boot 3.2.0 NestedFileSystemProvider #176

Closed
hjellek opened this issue Jan 11, 2024 · 2 comments
Closed

Add support for Spring Boot 3.2.0 NestedFileSystemProvider #176

hjellek opened this issue Jan 11, 2024 · 2 comments

Comments

@hjellek
Copy link
Contributor

hjellek commented Jan 11, 2024

Spring Boot 3.2.0 Introduces nested jars support, with a new NestedFileSystemProvider.
This is not automatically loaded into the resulting jar with the current implementation.

It seems like META-INF/services/java.nio.file.spi.FileSystemProvider is not loaded into the resulting jar when packaged.

When inspecting the jar, META-INF only contains the MANIFEST.MF file:

META-INF/
META-INF/MANIFEST.MF

while a similiar example with Maven correctly has the META-INF/services/java.nio.file.spi.FileSystemProvider file correctly packaged

META-INF/
META-INF/MANIFEST.MF
META-INF/services/
META-INF/services/java.nio.file.spi.FileSystemProvider

See https://github.com/hjellek/rules_spring/blob/spring-boot-3.2.1-example/examples/helloworld/src/test/java/com/sample/SampleNesteFileSystemUnitTest.java as a simple/naive example of the error.

One workaround for now is to use the spring-boot-loader-classic which results in usage of the old file loader, which does not produce resources with the jar:nested: property.

@plaird
Copy link
Contributor

plaird commented Jan 11, 2024

OK, thanks for pointing this out.

@hjellek
Copy link
Contributor Author

hjellek commented Jan 13, 2024

Thanks for such a fast response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants