I tried to test my MapReduce 2 job with mrunit in a maven project. I searched from Maven central repo and found the result: http://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.apache.mrunit%22%20AND%20a%3A%22mrunit%22
In the link above, the latest mrunit 1.1.0 has hadoop1.jar
and hadoop2.jar
rather than one jar link. Just due to this reason, when I tried to add the corresponding dependencies
<dependency>
<groupId>org.apache.mrunit</groupId>
<artifactId>mrunit</artifactId>
<version>1.1.0</version>
</dependency>
to pom.xml
and run mvn package
, I got the following compilation error: Could not find artifact org.apache.mrunit:mrunit:jar:1.1.0 in central (https://repo.maven.apache.org/maven2 ...
Could anyone help on how to fix this problem? Thanks in advance
After a few hours' inefficient research by myself, got the answer from my Colleague: this is solved by the maven's classifier
tag - http://maven.apache.org/plugins/maven-deploy-plugin/examples/deploying-with-classifiers.html
so added <classifier>hadoop2</classifier>
inside the dependency element
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With