Skip to content
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

Use Maven Eclipse Sisu to inject components #945

Closed
1 task done
abelsromero opened this issue Oct 19, 2024 · 0 comments
Closed
1 task done

Use Maven Eclipse Sisu to inject components #945

abelsromero opened this issue Oct 19, 2024 · 0 comments
Labels
Milestone

Comments

@abelsromero
Copy link
Member

What is this issue about?

  • Refactor 🔧

Description

We rely on manual instantiation or Helper classes with static methods to call other components in the code.
But Maven includes a native DI method based on JSR-330
DI should simplify how different classes are used, clean code and simplify configuration.

Some notes based on some testing:

  • @Singleton and @Inject annotations work for single instances without any change in both Mojo and Doxia Parsers 😄
  • Injecting a collection of multiple implementations of an interface didn't work 😞
  • Error reporting is not as nice as other tools 🍃 . Classes with @Singleton that cannot be build because a dependency is not met, are simply not created and an error is reported on the injection point, not the creation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant