Gradle build fails for dependency of avro-tools

0

I’ve been trying to convert a maven project into a grade build. One of the dependencies in the POM.xml is for avro-tools, as follows :

<dependency> 
<groupId>org.apache.avro</groupId>
<artifactId>avro-tools</artifactId>
<version>1.10.2</version>
</dependency>

On running gradle init in the project gradle generates a build.gradle file from the pom.xml with the following as a dependency : implementation group: ‘org.apache.avro’, name: ‘avro-tools’, version:‘1.10.0’

However, on running the build, I get the following error :

   Could not find avro-mapred-1.10.2-hadoop2.jar (org.apache.avro:avro-mapred:1.10.2).
    Searched in the following locations:
        https://repo.maven.apache.org/maven2/org/apache/avro/avro-mapred/1.10.2/avro-mapred-1.10.2-hadoop2.jar

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

If the same build is run in maven, the build works fine.

The dependency you mentioned resolves perfectly fine here.
I think you are looking at the wrong place.
But hard to guess if you don’t provide the full build script.