Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I specify the hadoop2 version of avro-mapred in maven?

Tags:

java

maven

The version of the jar I need is avro-mapred-1.7.7-hadoop2.jar. Here is the list of builds on maven central. How do I tell Maven to get the hadoop2 version?

like image 846
Mike Thomsen Avatar asked Aug 28 '14 11:08

Mike Thomsen


1 Answers

Use the <classifier> element. Like

<dependency>
    <groupId>org.apache.avro</groupId>
    <artifactId>avro-mapred</artifactId>
    <version>1.7.7</version>
    <classifier>hadoop2</classifier>
</dependency>

Aside: Normally with an IDE (like Eclipse) when you try add a dependency with the gui dialog, it will show the list of the different ones you can choose from

enter image description here

like image 59
Paul Samsotha Avatar answered Nov 06 '22 07:11

Paul Samsotha