[ 
https://issues.apache.org/jira/browse/AVRO-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17464683#comment-17464683
 ] 

Ryan Skraba commented on AVRO-3273:
-----------------------------------

I've also verified that this isn't a problem with Avro 1.10.2

> [Java] avro-maven-plugin breaks on old versions of Maven
> --------------------------------------------------------
>
>                 Key: AVRO-3273
>                 URL: https://issues.apache.org/jira/browse/AVRO-3273
>             Project: Apache Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.11.0
>            Reporter: Ryan Skraba
>            Assignee: Ryan Skraba
>            Priority: Major
>             Fix For: 1.11.1
>
>
> If you generate an example project:
> {code}
> 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
> {code}
> 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).
> {code}
> [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)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to