Mike Thomsen
Mike Thomsen

Reputation: 37526

How do I specify the hadoop2 version of avro-mapred in 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?

Upvotes: 7

Views: 3111

Answers (1)

Paul Samsotha
Paul Samsotha

Reputation: 209102

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

Upvotes: 7

Related Questions