1

Can some let me know how does maven internally manages package dependency? Is there any architecture diagram available on the net for the same? I also asked this in Quora and maven user mailing list but did not get any response their nor I am able to find any suitable resources in the web that explains the working of maven and even better if I can find some class diagram?

  • Maven, The Complete Reference, licensed under Creative Commons. – Robert Harvey Jun 15 '16 at 16:39
  • yeah I have gone through the content of that book but it seems this does not talk's about maven's own internal architecture. – tuk Jun 15 '16 at 17:03
  • Have you considered asking the folks at Maven? – Robert Harvey Jun 15 '16 at 17:11
  • yeah asked in maven user mailing list. But no response their also. – tuk Jun 16 '16 at 10:40
1

Maven uses dependency injection internally. Between version 2 and 3 it switched the implementation from Plexus to Guice:

Maven has a long history of using dependency injection (DI) by way of Plexus, so the intent of using JSR-330 is to replace a custom DI mechanism with something standard. The implementation Maven uses - since 3.0-beta-3 - is based on Guice 3.x, which directly supports JSR-330.

If you are using Plexus annotations and APIs currently, there is no rush to switch and no big bang conversions are necessary: Plexus, JSR-330 and Guice APIs all happily co-exist within Maven's core and you can choose to use JSR-330 when you wish. There are hundreds of components written using the Plexus APIs, particularly components and plugins compatible with Maven 2, then those APIs will be supported forever, or at least until Maven fully drops Maven 2 support.

Maven's goal was never to create a dependency injection framework, it was always focused on builds and the infrastructure that supports development. Not long ago, we were contemplating what it would take to improve Plexus, we looked at the effort required to document and support Plexus going forward, and it just didn't make any sense for us to continue to apply precious time and effort to a problem that had already been solved by several others. It makes sense to focus the community, and moving to Guice will allow us to devote more of our own resources to supporting the central projects and products.

References

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.