Closed HomeOfTheWizard closed 1 year ago
I think it might work, actually. You can see that someone thought about it here: https://maven.apache.org/ref/3.9.0/maven-core/core-extensions.html (look for commented out com.google.inject
packages). I updated my sample https://github.com/scratches/plugin-demo to use this approach.
Ok I see now. it was my META-INF/maven/extension.xml file that wasnt exported correctly. indeed it works !
Hi, I tried to use a custom Guice module to bind an specific instance of class in an extension, following this tutorial. https://github.com/eclipse/sisu.plexus/wiki/Plexus-to-JSR330#custom-bindings
But couldnt make it work. https://github.com/HomeOfTheWizard/demo-maven-extension.
When I lookup in the container, I see the module is picked up, but cannot find the component that I bind with the module. Here is what I do
I saw that the
session.getContainer()
is deprecated. Maybe there is a better API to search in the sisu container ? Can you please help me 🙏