-
Notifications
You must be signed in to change notification settings - Fork 40.8k
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
Additional metadata not merged with boot autoconfigure jar in classpath #2271
Comments
Something I didn't try but thought about, instead of using |
@philwebb I think this is not yet ok. Just tried from master with additional logging:
File is in |
@jvalkeal Do you you have a branch with this code committed somewhere that I can use to test? |
@philwebb yeah, https://github.com/jvalkeal/spring-hadoop/tree/SHDP-452-work1 which uses 1.2.1.BUILD-SNAPSHOT with mavenLocal(). Do something like:
|
Cheers. I think I have a fix now. |
@philwebb just a note here. This now works but I need to tell gradle to run
Maybe add a little note section to docs? |
Arrrghhh! |
I've raised #2316 :( |
Update ConfigurationMetadataAnnotationProcessor to find the additional metadata json file using createResource rather than getResource. Prior to this commit the file could be skipped when multiple files were contained on the classpath. Fixes spring-projectsgh-2271
Update the additional metadata detection logic to deal with Gradle folder layouts. Fixes spring-projectsgh-2271
I'm having an issue with my properties not resolving in a shadowJar using Gradle. Could this be the root cause? I have nothing merging |
@btiernay I doubt it. The metadata described in this issue isn't used at runtime. It's used by IDEs to provide auto-completion |
@wilkinsona turns out this was related to #1828. Cheers! |
With gradle(should also happen with maven)
additional-spring-configuration-metadata.json
is not merged intospring-configuration-metadata.json
which seems to be caused by a multiple files in a tool classpath.I added some logging:
When compiling boot itself, I see expected shown below:
When I added bits to SHDP boot module, I see this:
Scheme is
jar
so no metadata gets merged. Tests jar is seeing this json with afile
scheme and stuff is actually merged correctly in this case. I guess in case of tests.jar location ofadditional-spring-configuration-metadata.json
just happens to be correct one returned by aJavacFileManager
.Checking JavacFileManager sources at
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/com/sun/tools/javac/util/JavacFileManager.java#1097
First path is returned whatever it is.
spring-hadoop-boot
depends onspring-boot-autoconfigure
so secondadditional-spring-configuration-metadata.json
is always there. I guess this is only reliable if classpath contains only oneadditional-spring-configuration-metadata.json
file.The text was updated successfully, but these errors were encountered: