user2494770
user2494770

Reputation:

Missing Artifact in Maven Project?

I'm trying to follow a MapR/Hadoop tutorial and when I reference this dependency it says missing artifact. Any suggestions on how to fix this?

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>FirstHadoopProject</groupId>
    <artifactId>FirstHadoopProject</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-core</artifactId>
            <version>1.0.3-mapr-2.1.2.1</version>
        </dependency>
    </dependencies>
</project>

It highlights depency and says: Missing artifact org.apache.hadoop:hadoop-core:jar:1.0.3-mapr-2.1.2.1

The tutorial doesn't specify what to do if that happens :/

Upvotes: 1

Views: 3874

Answers (1)

gregwhitaker
gregwhitaker

Reputation: 13410

1.0.3-mapr-2.1.2.1 is not a valid version in the central repository. Try updating the dependency to:

    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-core</artifactId>
        <version>1.0.3</version>
    </dependency>

or better yet, if the example will still compile, the latest version of hadoop-core:

    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-core</artifactId>
        <version>1.2.0</version>
    </dependency>

EDIT:

You can check the version via the central repo:

http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22hadoop-core%22

Upvotes: 1

Related Questions