-
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
Add type metadata to jars' manifests #22203
Conversation
I wonder if generalizing this slightly could help us fix #22025 as well. |
@snicoll You mean marking |
Yes. I should mention this was targeted to the team at large to see if we could come up with a manifest entry that makes sense for both this use case and the issue I've referenced. |
I like that idea, @snicoll. A more general purpose manifest header that can be used to influence what's included sounds good to me. I'm struggling to think of a good name for it though. In the interests of consistency, I think it makes sense for the exclusion to apply more broadly than just building fat jars and wars. It should probably also affect the classpath used for |
What about @wilkinsona I would need a pointer which classes are involved when this should be applied on a broader level beyond packaging. At the moment I'm looking at |
For Gradle, I'd try to do it by filtering the classpath that the I've just reminded myself that the application distribution that Boot configures uses the fat jar or war so we don't need to worry about that one. |
For Gradle, this seems to conflict with |
@snicoll I just tried adding the following to a test project's
When packaging this up I see no jar of the processor included in the build. |
That's strange. That configurer checks the classpath of the |
When adding the following to a
and packaging this up via |
That's the behaviour that I would expect with Gradle. With Maven, my understanding was that the annotation processor would be included in the fat jar and #22025 was opened to improve that. |
Would that also render the classpath discussion obsolete? If it doesn't I would need help there, I'm afraid... |
Edit: I tried Maven again with a clean build again and it included the processors. Sorry for the noise. For Gradle, it seems to be not included as I wrote earlier. |
No, I don't think so. I'd like to try to use a classpath-filtering-based mechanism for the starters.
Sure thing. Let us know when you're ready to pass the baton and we can take it from there. |
I've pushed a more general solution for the packaging aspect with a new |
I just renamed |
Thanks, @dreis2211. FWIW, I think |
I wasn't really happy with either |
We had a bit of a brainstorm today and we quite like |
And for the others? Leave it empty? I could at least do that before you can take it over... |
Yeah, leave it empty for the others please. |
Okay, I will craft a new plugin then and let you know when I'm finished. |
I added a new |
Thanks for the PR, @dreis2211. In reviewing this I came to the conclusion that we should take a different approach to filtering out the jars in the Maven and Gradle plugins so I reworked the changes here to add the |
Hi,
this PR fixes #22036 by marking the starter jars with an additional attribute in their manifest which is later checked to exclude the starter JAR during packaging.
I opened the PR now to discuss the taken approach better.
Let me know what you think.
Cheers,
Christoph