-
-
Notifications
You must be signed in to change notification settings - Fork 422
Description
What feature do you want to see added?
It would be nice if there was a possibility to configure Spring shading and relocation.
There's META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports which can currently be handled with ServiceFileTransformer, however, it would be nice if out-of-the-box SpringTransfomer would handle it as well.
There's META-INF/spring-configuration-metadata.json which contains helper information for IDE, and we can probably ignore it for now, however, transforming and merging that file would be a plus.
Spring has several files which should be modified for proper relocation:
"META-INF/spring-autoconfigure-metadata.properties",
"META-INF/spring.factories",
"META-INF/spring.handlers",
"META-INF/spring.schemas",
"META-INF/spring.tooling",The files are in Properties format, however:
schemasandtoolinghavepathfor the values- The rest have
classfor the values factorieshasclassfor the values
Sometimes, the values are comma-separated, so merging should use comma-separated value.
I've implemented SpringFileTransformer which works for me, however, it would be nice if there was out-of-the-box one.
Even though shading Spring is awkward, there are cases when it is needed. See also:
- My implementation (Apache 2.0 code ahead): https://github.com/Netcracker/qubership-profiler-agent/pull/192/files#diff-e17241eb65fd812b70ff17dbad8b4e643a464aa329220590758e689e12e2abb9R13
- Document using the Shadow plugin as an alternative to Boot's uber jars when using Gradle spring-projects/spring-boot#1828.
Are you interested in contributing this feature?
I might contribute, however, I am not comfortable with writing Groovy code.