Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-313

Error injecting JavaAnnotationsMojoDescriptorExtractor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Cannot Reproduce
    • 3.5
    • None
    • API
    • None

    Description

      In the latest 3.5 snapshot, an exception prevents the building of a Mojo. I tagged this as a "blocker" because I cannot find a workaround.

      Messages and stack trace:

      [WARNING] The POM for org.apache.maven.plugin-tools:maven-plugin-tools-annotations:jar:3.5-20160826.210808-25 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
      [INFO] java-javadoc mojo extractor found 0 mojo descriptor.
      [WARNING] Error injecting: org.apache.maven.tools.plugin.extractor.annotations.JavaAnnotationsMojoDescriptorExtractor
      java.lang.NoClassDefFoundError: org/codehaus/plexus/archiver/manager/NoSuchArchiverException
      	at java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
      	at java.lang.Class.getDeclaredConstructors(Class.java:2020)
      	at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
      	at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:99)
      	at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:657)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:875)
      	at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:798)
      	at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:281)
      	at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:213)
      	at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:998)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1031)
      	at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:994)
      	at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1044)
      	at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
      	at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:54)
      	at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
      	at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)
      	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
      	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
      	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
      	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:46)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1066)
      	at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
      	at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:36)
      	at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
      	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1009)
      	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1059)
      	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1005)
      	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
      	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
      	at java.util.AbstractMap.get(AbstractMap.java:187)
      	at org.apache.maven.tools.plugin.scanner.DefaultMojoScanner.populatePluginDescriptor(DefaultMojoScanner.java:87)
      	at org.apache.maven.plugin.plugin.AbstractGeneratorMojo.execute(AbstractGeneratorMojo.java:245)
      	at org.apache.maven.plugin.plugin.DescriptorGeneratorMojo.execute(DescriptorGeneratorMojo.java:90)
      	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      ...
      Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.archiver.manager.NoSuchArchiverException
      	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
      	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
      	... 60 more
      

      Build failure message:

      Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.5-SNAPSHOT:descriptor (default-descriptor) on project mymojo-maven-plugin: The API of the mojo scanner is not compatible with this plugin version. Please check the plugin dependencies configured in the POM and ensure the versions match. org/codehaus/plexus/archiver/manager/NoSuchArchiverException: org.codehaus.plexus.archiver.manager.NoSuchArchiverException -> [Help 1]
      

      PS: How is failure to inject a "warning"? Usually warnings are situations that are abnormal but are recoverable. I believe this should be an "error" since there's not an alternative, no?

      Attachments

        Activity

          People

            rfscholte Robert Scholte
            pbenedict Paul Benedict
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: