Skip to content

Generate Spring Configuration Metadata via spring-boot-configuration-processor #1842

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

Closed
mmoayyed opened this issue May 11, 2023 · 6 comments · Fixed by #1846
Closed

Generate Spring Configuration Metadata via spring-boot-configuration-processor #1842

mmoayyed opened this issue May 11, 2023 · 6 comments · Fixed by #1846
Labels
priority: p2 type: bug Something isn't working

Comments

@mmoayyed
Copy link

mmoayyed commented May 11, 2023

Is your feature request related to a problem? Please describe.

It looks as though the project here does have a dependency on spring-boot-configuration-processor, but I don't see the generated JSON in META-INF/spring-configuration-metadata.json. I would expect this file to show up in the final JAR for com.google.cloud:spring-cloud-gcp-autoconfigure:4.3.0 but there exists none.

Describe the solution you'd like

There should be a META-INF/spring-configuration-metadata.json generated for the com.google.cloud:spring-cloud-gcp-autoconfigure artifact and released.

Describe alternatives you've considered

N/A

Additional context

Using google cloud SDK 4.3.0.

@mpeddada1
Copy link
Contributor

@mmoayyed Thanks for filing this issue! To gain a little more info, do you observe the same in the previous versions of spring-cloud-gcp-autoconfigure? Or is this a recent phenomenon that has started happening with 4.3.0.

@mpeddada1 mpeddada1 added type: question Further information is requested priority: p2 labels May 11, 2023
@mmoayyed
Copy link
Author

If I look at history:

  • 4.3.0 has the same issue
  • 4.2.0 has the same issue
  • 4.1.0 has the same issue
  • 4.0.0 does NOT have this issue

So somewhere between 4.0.0 and 4.1.0, this capability disappeared.

@mpeddada1
Copy link
Contributor

mpeddada1 commented May 12, 2023

Thanks for the investigation! A few notes as we look into this further:
I just did a quick verification using jar -xf for the spring-cloud-gcp-autoconfigure JARs downloaded from Maven Central for versions 4.3.0,4.2.0 and 4.1.0 and the META-INF/spring-configuration-metadata.json file seems to have been present until 4.3.0:

Screenshot 2023-05-12 at 1 18 17 PM

One notable change that recently took place was the update of Spring Boot to 3.0.6 but we still need to dig a little further into the root cause.

@meltsufin @JoeWang1127 @emmileaf any additional thoughts on this?

@mpeddada1 mpeddada1 added type: bug Something isn't working and removed type: question Further information is requested labels May 12, 2023
@mmoayyed
Copy link
Author

Thank you, this also confirms what I am seeing in my build as well. (I mistakenly was looking for the file in previous versions under the spring directory, sorry about that!).

@meltsufin meltsufin closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2023
@emmileaf
Copy link
Contributor

emmileaf commented May 12, 2023

Thanks @mpeddada1 for the investigation!

Since this file gets generated at compile time, I checked for it under spring-cloud-gcp-autoconfigure/target with mvn clean install at a couple of commits, and think it disappeared after #1775 fixed the maven-compiler-plugin artifact id.

The difference is likely from now needing to specify spring-boot-configuration-processor explicitly under annotationProcessorPaths- it was included previously because the plugin was actually not correctly applying the other configurations earlier.

@meltsufin
Copy link
Member

@mpeddada1 @emmileaf Sorry for mistakenly closing the issue previously, and thanks for resolving it quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 type: bug Something isn't working
Projects
None yet
4 participants