Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-3273

[Java] avro-maven-plugin breaks on old versions of Maven

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      If you generate an example project:

      mvn archetype:generate -B -DarchetypeGroupId=org.apache.avro -DarchetypeArtifactId=avro-service-archetype -DarchetypeVersion=1.11.0 -DgroupId=com.example -DartifactId=avro-simple -Dversion=1.0.0-SNAPSHOT -Dpackage=com.example
      

      It compiles correctly with recent versions of maven, but fails for maven 3.2.5 and 3.3.9. (Notably, Flink uses maven 3.2.5).

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 6.864 s
      [INFO] Finished at: 2021-12-23T16:07:10+00:00
      [INFO] Final Memory: 36M/545M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install (default-install) on project avro-simple: Execution default-install of goal org.apache.maven.plugins:maven-install-plugin:2.5.2:install failed: Unable to load the mojo 'install' (or one of its required components) from the plugin 'org.apache.maven.plugins:maven-install-plugin:2.5.2': com.google.inject.ProvisionException: Unable to provision, see the following errors:
      [ERROR] 
      [ERROR] 1) Error injecting: private org.eclipse.aether.spi.log.Logger org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger
      [ERROR] while locating org.apache.maven.repository.internal.DefaultVersionRangeResolver
      [ERROR] while locating java.lang.Object annotated with *
      [ERROR] at org.eclipse.sisu.wire.LocatorWiring
      [ERROR] while locating org.eclipse.aether.impl.VersionRangeResolver
      [ERROR] for parameter 2 at org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector.<init>(Unknown Source)
      [ERROR] while locating org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector
      [ERROR] while locating java.lang.Object annotated with *
      [ERROR] at org.eclipse.sisu.wire.LocatorWiring
      [ERROR] while locating org.eclipse.aether.impl.DependencyCollector
      [ERROR] for parameter 5 at org.eclipse.aether.internal.impl.DefaultRepositorySystem.<init>(Unknown Source)
      [ERROR] while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
      [ERROR] while locating java.lang.Object annotated with *
      [ERROR] while locating org.apache.maven.artifact.installer.DefaultArtifactInstaller
      [ERROR] at ClassRealm[plexus.core, parent: null] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
      [ERROR] at ClassRealm[plexus.core, parent: null] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
      [ERROR] while locating org.apache.maven.artifact.installer.ArtifactInstaller
      [ERROR] while locating org.apache.maven.plugin.install.InstallMojo
      [ERROR] at ClassRealm[plugin>org.apache.maven.plugins:maven-install-plugin:2.5.2, parent: sun.misc.Launcher$AppClassLoader@7852e922] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
      [ERROR] while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value=org.apache.maven.plugins:maven-install-plugin:2.5.2:install)
      [ERROR] Caused by: java.lang.IllegalArgumentException: Can not set org.eclipse.aether.spi.log.Logger field org.apache.maven.repository.internal.DefaultVersionRangeResolver.logger to org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory
      [ERROR] at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
      [ERROR] at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
      

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rskraba Ryan Skraba
            rskraba Ryan Skraba
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h

                Slack

                  Issue deployment