-
Notifications
You must be signed in to change notification settings - Fork 130
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
maven-extension - plexus-component-annotations upgrade has deprecations #1147
Comments
Thanks I'll look at this. |
Any traction? I think the extension is stalled without a refresh. 🤞🏻 |
Thanks for the heads up. Some findings so far:
|
See test Maven extensions https://github.com/cyrille-leclerc/maven-extension-test
The OpenTelemetry Maven Extension primarily relies on |
@hboutemy, hello! A few years ago, I discussed with you the challenges we faced with the OpenTelemetry Maven Extension to replace the Plexus APIs by JSR-330/Sisu. |
Hi @cyrille-leclerc , thanks for the heads up I'm surprised AbstractExecutionListener injection works with Plexus but not Sisu: I did my own study a few years ago https://maven.apache.org/studies/extension-demo/ (from source code https://github.com/apache/maven-studies/tree/maven-extension-demo ) and I did not detect that discrepency reproducing the issue you're facing with such a little project is our best bet to dive into the issue you're facing |
ok, re-reading your example and mine, we only tested AbstractExecutionListener with Sisu/JSR 330, not Plexus and its annotations: do you have an example of Plexus annotations working for AbstractExecutionListener? |
Thanks Hervé, I'll double check with Plexus container. |
ok, I had a new look at it and now I understand and can explain: AbstractExecutionListener is not used by Maven core as components (be it Plexus, Sisu or JSR-330), only MavenLifecycleParticipant and EventSpy are components I updated my extension demo to try to be more clear on it: https://maven.apache.org/studies/extension-demo/ feedback appreciated if more clarification is needed |
You are right @hboutemy , I have added Plexus
I think I got confused with
The statement above let me think that Maven extensions could extend any of Your page Maven Core Extension Demo Study is clearer than Example: Using Maven 3 lifecycle extension - Lifecycle Extension Points |
Component(s)
maven-extension
What happened?
See #1141 for the latest version update to
plexus-component-annotations
2.2.0.It appears that they have deprecated
@Component
in favor of just using the JSR330 annotations instead. Specifically, instead of using@Component
it looks like we can just used@Named
. For@Requirement
it looks like the recommendation is to use constructor injection an annotate the ctor with@Inject
.The text was updated successfully, but these errors were encountered: