This is all near and dear to my heart.

First, some terminology clearing up: the Maven internals rely on a JSR-330
implementation (javax.inject.*), not CDI (javax.enterprise.inject.*).  CDI
is a JSR-330 implementation, but so is Guice, HK2, etc.  I believe that the
internals of Maven rely on Guice, but as Robert says, if you're not
rebuilding the innards of Maven then using the facilities of JSR-330 make
the code really simple.

I did actually put parts of Maven in CDI (
https://microbean.github.io/microbean-maven-cdi/).  You may find some of
the implementation classes in question that you need in there.  Start here:
https://github.com/microbean/microbean-maven-cdi/blob/c5abd2e3c321020c419442c44ef726e48952d983/src/main/java/org/microbean/maven/cdi/MavenExtension.java#L317

Best,
Laird
--
https://about.me/lairdnelson

Reply via email to