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

Sylwester Lachiewicz reassigned MNG-6580:
-----------------------------------------

    Assignee: Sylwester Lachiewicz

> Unable to inject annotations from classes compiled for Java 9+
> --------------------------------------------------------------
>
>                 Key: MNG-6580
>                 URL: https://issues.apache.org/jira/browse/MNG-6580
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.6.0
>            Reporter: Sylwester Lachiewicz
>            Assignee: Sylwester Lachiewicz
>            Priority: Major
>             Fix For: 3.7.x-candidate
>
>
> While Sisu (0.3.3) is searching for implementation classes to be available 
> for injection - it accepts only classes compiled for Java up to 8
> [https://github.com/eclipse/sisu.inject/blob/master/org.eclipse.sisu.inject/src/org/eclipse/sisu/space/asm/ClassReader.java#L168]
> If an implementation is compiled for Java 9+ warning will be logged 
> (log.Sisu=trace) and class ignored.
> {code:java}
> [main] [TRACE] Sisu - Problem scanning: 
> jar:file:/c:/programs/apache-maven-3.6.1-SNAPSHOT/bin/../lib/maven-core-3.6.1-SNAPSHOT.jar!/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.class
> java.lang.IllegalArgumentException
>  at org.eclipse.sisu.space.asm.ClassReader.<init> (ClassReader.java:170)
>  at org.eclipse.sisu.space.asm.ClassReader.<init> (ClassReader.java:153)
>  at org.eclipse.sisu.space.asm.ClassReader.<init> (ClassReader.java:424)
>  at org.eclipse.sisu.space.SpaceScanner.accept (SpaceScanner.java:102)
>  at org.eclipse.sisu.space.SpaceScanner.accept (SpaceScanner.java:78)
>  at org.eclipse.sisu.space.SpaceModule.scanForElements (SpaceModule.java:168)
>  at org.eclipse.sisu.space.SpaceModule.configure (SpaceModule.java:129)
>  at org.eclipse.sisu.plexus.PlexusAnnotatedBeanModule.configure 
> (PlexusAnnotatedBeanModule.java:102)
>  at org.eclipse.sisu.plexus.PlexusBindingModule.configure 
> (PlexusBindingModule.java:63)
>  at com.google.inject.spi.Elements$RecordingBinder.install (Elements.java:344)
>  at com.google.inject.spi.Elements.getElements (Elements.java:103)
>  at com.google.inject.spi.Elements.getElements (Elements.java:96)
>  at org.eclipse.sisu.wire.WireModule.configure (WireModule.java:75)
>  at com.google.inject.spi.Elements$RecordingBinder.install (Elements.java:344)
>  at com.google.inject.spi.Elements.getElements (Elements.java:103)
>  at com.google.inject.internal.InjectorShell$Builder.build 
> (InjectorShell.java:137)
>  at com.google.inject.internal.InternalInjectorCreator.build 
> (InternalInjectorCreator.java:103)
>  at com.google.inject.Guice.createInjector (Guice.java:87)
>  at com.google.inject.Guice.createInjector (Guice.java:69)
>  at com.google.inject.Guice.createInjector (Guice.java:59)
>  at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector 
> (DefaultPlexusContainer.java:481)
>  at org.codehaus.plexus.DefaultPlexusContainer.<init> 
> (DefaultPlexusContainer.java:206)
>  at org.apache.maven.cli.MavenCli.container (MavenCli.java:635)
>  at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:281)
>  at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
>  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:62)
>  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke (Method.java:566)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced 
> (Launcher.java:282)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.launch 
> (Launcher.java:225)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode 
> (Launcher.java:406)
>  at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
> {code}
> and a similar error is thrown
> {code:java}
> [WARNING] Error injecting: 
> org.apache.maven.project.DefaultProjectBuildingHelper
> com.google.inject.ProvisionException: Unable to provision, see the following 
> errors:
> 1) No implementation for org.apache.maven.classrealm.ClassRealmManager was 
> bound.
>   while locating org.apache.maven.project.DefaultProjectBuildingHelper
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to