You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jose Montoya (JIRA)" <ji...@apache.org> on 2019/08/18 17:35:00 UTC

[jira] [Updated] (MNG-6739) JSR 330 not picking up Guice Custom Bindings

     [ https://issues.apache.org/jira/browse/MNG-6739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Montoya updated MNG-6739:
------------------------------
    Description: 
See: [https://maven.apache.org/maven-jsr330.html] and [https://wiki.eclipse.org/Sisu/PlexusMigration]

These docs state that Guice Modules annotated with `@Named` will be loaded and configured automatically by Sisu. I think the actual loading is done by `org.eclipse.sisu.space.QualifiedTypeBinder` but it only seems to work when running tests via the `maven-plugin-testing-harness` and not when actually running the plugin.

I've tried to add various different artifacts to compilation including `sisu.inject`, `sisu.inject.extender` and `plexus-container-default` but cannot get the Modules to be loaded, and consequently the Mojo fails to instantiate with com.google.inject.ProvisionException: Unable to provision.

I'm working on a simple project to reproduce, I'll update the ticket with a link to it. If I can provide more information, or if I'm just missing something simple please let me know. Thanks


EDIT: Here's the repo [https://github.com/jam01/maven-plugin-jsr330-issue]
 ```
 mvn clean install
 mvn com.jam01.test:printer-maven-plugin:print
 ```

  was:
See: [https://maven.apache.org/maven-jsr330.html] and [https://wiki.eclipse.org/Sisu/PlexusMigration]

These docs state that Guice Modules annotated with `@Named` will be loaded and configured automatically by Sisu. I think the actual loading is done by `org.eclipse.sisu.space.QualifiedTypeBinder` but it only seems to work when running tests via the `maven-plugin-testing-harness` and not when actually running the plugin.

 

I've tried to add various different artifacts to compilation including `sisu.inject`, `sisu.inject.extender` and `plexus-container-default` but cannot get the Modules to be loaded, and consequently the Mojo fails to instantiate with com.google.inject.ProvisionException: Unable to provision.

 

I'm working on a simple project to reproduce, I'll update the ticket with a link to it. If I can provide more information, or if I'm just missing something simple please let me know. Thanks


> JSR 330 not picking up Guice Custom Bindings
> --------------------------------------------
>
>                 Key: MNG-6739
>                 URL: https://issues.apache.org/jira/browse/MNG-6739
>             Project: Maven
>          Issue Type: Bug
>          Components: Plugins and Lifecycle
>    Affects Versions: 3.6.0
>            Reporter: Jose Montoya
>            Priority: Major
>
> See: [https://maven.apache.org/maven-jsr330.html] and [https://wiki.eclipse.org/Sisu/PlexusMigration]
> These docs state that Guice Modules annotated with `@Named` will be loaded and configured automatically by Sisu. I think the actual loading is done by `org.eclipse.sisu.space.QualifiedTypeBinder` but it only seems to work when running tests via the `maven-plugin-testing-harness` and not when actually running the plugin.
> I've tried to add various different artifacts to compilation including `sisu.inject`, `sisu.inject.extender` and `plexus-container-default` but cannot get the Modules to be loaded, and consequently the Mojo fails to instantiate with com.google.inject.ProvisionException: Unable to provision.
> I'm working on a simple project to reproduce, I'll update the ticket with a link to it. If I can provide more information, or if I'm just missing something simple please let me know. Thanks
> EDIT: Here's the repo [https://github.com/jam01/maven-plugin-jsr330-issue]
>  ```
>  mvn clean install
>  mvn com.jam01.test:printer-maven-plugin:print
>  ```



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)