Uploaded image for project: 'Maven Resolver'
  1. Maven Resolver
  2. MRESOLVER-298

javax.inject should be provided or optional

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.9.4
    • Resolver
    • None

    Description

      Using resolver in a non DI context and got this exception

      java.lang.NoClassDefFoundError: javax/inject/Provider
      	at org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapterFactoryImpl.getManuallyCreatedNameMappers(NamedLockFactoryAdapterFactoryImpl.java:85)
      	at org.eclipse.aether.internal.impl.synccontext.named.NamedLockFactoryAdapterFactoryImpl.<init>(NamedLockFactoryAdapterFactoryImpl.java:117)
      	at jdk.internal.reflect.GeneratedConstructorAccessor26.newInstance(Unknown Source)
      

      This is because javax.inject is declared as provided and/or optional whereas it's not.

      Reason: 1.9.0 introduced an unintended change that made it REQUIRED. Fix is to change code to not load any Provider when it is not used in Guice/Sisu.

      Attachments

        Issue Links

          Activity

            People

              cstamas Tamas Cservenak
              olamy Olivier Lamy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: