Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-6210

can't load @SessionScoped/@MojoExecutionScoped components from .mvn/extensions.xml

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.3.3, 3.3.9
    • Fix Version/s: 3.5.2
    • Component/s: Class Loading
    • Labels:
      None

      Description

      The build fails with the exception below if Maven core extensions defined in .mvn/extensions.xml includes any @SessionScoped or MojoExecutionScoped components

      [WARNING] ClassRealm[coreExtension>io.takari.maven:takari-workspace-reader:0.3.31-SNAPSHOT, parent: ClassRealm[plexus.core, parent: null]]
      com.google.inject.CreationException: Unable to create injector, see the following errors:
      
      1) No scope is bound to org.apache.maven.SessionScoped.
        at io.takari.maven.workspace.GenerationsWorkspaceReader.class(Unknown Source)
        at ClassRealm[coreExtension>io.takari.maven:takari-workspace-reader:0.3.31-SNAPSHOT, parent: ClassRealm[plexus.core, parent: null]] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
      
      1 error
      	at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist(Errors.java:466)
      	at com.google.inject.internal.InternalInjectorCreator.initializeStatically(InternalInjectorCreator.java:155)
      	at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:107)
      	at com.google.inject.Guice.createInjector(Guice.java:96)
      	at com.google.inject.Guice.createInjector(Guice.java:73)
      	at com.google.inject.Guice.createInjector(Guice.java:62)
      	at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector(DefaultPlexusContainer.java:481)
      	at org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:460)
      	at org.codehaus.plexus.DefaultPlexusContainer.discoverComponents(DefaultPlexusContainer.java:435)
      	at org.apache.maven.cli.MavenCli.container(MavenCli.java:568)
      	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:287)
      	at org.apache.maven.cli.MavenCli.main(MavenCli.java:205)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
      
      

        Attachments

          Activity

            People

            • Assignee:
              igorf Igor Fedorenko
              Reporter:
              igorf Igor Fedorenko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: