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
When spring-boot-configuration-processor is a dependency exclude it automatically in spring-boot-maven-plugin's configuration #528
Comments
Blocked by spring-io/initializr#1165 |
If I'm reading the other issue correctly and also correctly grokking the implication, there is already an exclude being processed that precludes this being added, per the docs? |
I don't know what you mean by "the other issue" and "per the docs", I am afraid. If you're talking about the feature that we flag certain annotation processors to exclude them automatically, this is a 2.4+ feature only and the customiser handles that. |
"Per the docs" refers to the documentation @wilkinsona links in the issue in which it states that the developer must manually exclude the Creating a Boot 2.4.1 project with the configuration processor using Initializr doesn't show the exclusion Andy and I discussed as captured in this issue. This is the plugin section from the Initializr-generated POM for 2.4.1:
The question really revolves around this: Since we state this in the docs that... If you have defined @ConfigurationProperties in your application, make sure to configure the spring-boot-maven-plugin to prevent the repackage goal from adding the dependency into the fat jar:
...couldn't we/shouldn't we do that automatically when generating the build file? |
@snicoll I believe some of the confusion is over the docs vs. the apparent reality (?) of 2.4+, as the current (2.4.1) docs still show the same set of steps for devs to take when using the configuration processor, implying it's still necessary. |
Thanks for the additional context.
It does not because this particular annotation processor has extra metadata and we filter it out automatically. See spring-projects/spring-boot#22036. If you select
We're on the same page now. Yes, the doc should have been updated, thanks for spotting that. I've created spring-projects/spring-boot#24498 |
Makes sense. Thank you @snicoll, this is good! |
As suggested by @mkheck, when a Maven project depends upon
spring-boot-configuration-processor
, we could automatically configure the following exclusion that's described in the reference documentation:The text was updated successfully, but these errors were encountered: