-
Notifications
You must be signed in to change notification settings - Fork 40.2k
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
Exclude our own annotation processors from the packaged jar with Maven #10539
Comments
Have you thought to provide different suggestions in how the users should use the annotation processors? The maven compiler plugin has There is on downside in IntelliJ though. That is: IDEA-150621. However, I think that you would have bigger chances to make Jetbrains pick up the issue and resolve it :). |
@filiphr The |
@snicoll I can't see any downside to adding the excludes. I think we should do it. |
Only IntelliJ with Maven does not support that. All the others do.
For Gradle there is the gradle-apt-plugin that adds new configurations and you add the processors with that configuration. I can certainly open a new issue if you prefer like that. Just wanted to share my knowledge and give an idea about a possible way of solving this on the long term |
@filiphr Yes please to a new issue. We can keep this one for the quick exclude fix and then work on the new issue in the longer term. |
@filiphr that's the exact reason why it's not referenced that way. Usability in the IDE trumps anything else so I don't see ourselves recommending an approach that doesn't work OOB in an IDE. |
@snicoll I completely agree with you with this. I wanted to mention an alternative (that might be better for the users), when the IDE things are cleared up of course. I also thought that if a request comes from the Spring Boot team, IntelliJ might have a bigger incentive to fix the issue 😉. In any case, I am going to open a new issue for my suggestion for the future. |
Perhaps. I did ask them if they could higher the priority of the issue you've referenced. |
That is great. It would actually help us in the Annotation Processor Project that I am involved in 😄. I've also created #10645 as a separate issue to track the progress as we said that we don't want to use this one for changing the approach |
IntelliJ supports However, that appears to break some of lombok's processing, and lombok doesn't appear to work at all when added to |
Further to |
Superseded by #22036 |
The superseding solution doesn't account for other annotation processors, which won't have the Spring Boot manifest entry? |
Correct but this issue wasn't about those either. We can't do anything smart/out-of-the-box for the things we don't know about. |
We don't have any plans to workaround this problem further as it's induced by Maven in the first place. If you can't use |
Spring Boot uses all defined dependencies (including the ones that are "optional" and "provided").
There is a special cases that Spring Boot supports: annotation processors, one for improving the performance of auto-configuration and the other to generate the meta-data for custom keys. While the former should not land in a final artifact, the latter is a bit more frequent.
There is a way to exclude them using the
exclude
option of the plugin but perhaps it would be nice to detect them (like we do for devtools). That way, they would be excluded automatically as we know those are definitely not required at runtime.The text was updated successfully, but these errors were encountered: