Vimal Dhaduk
Vimal Dhaduk

Reputation: 1034

Not able to load maven depedency for spark-cloudant. getting Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11

In Java I am adding below maven dependency,

<dependency>
            <groupId>cloudant-labs</groupId>
            <artifactId>spark-cloudant</artifactId>
            <version>2.0.0-s_2.11</version>
        </dependency>

but it is not loading package even in pom.xml file showing below error,

Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11

Can anyone help me please why it is causing issue?

I am able to add another maven dependencies but particularly this is not working..

Upvotes: 2

Views: 565

Answers (2)

VladoDemcak
VladoDemcak

Reputation: 5275

It's not in the official maven repository. (http://search.maven.org/#search%7Cga%7C1%7Cspark-cloudant)

But when you check: https://mvnrepository.com/artifact/cloudant-labs/spark-cloudant/2.0.0-s_2.11 there is note:

Note: this artifact it located at Spark Packages repository (https://dl.bintray.com/spark-packages/maven/)

So you will need to add following to your pom.xml:

<repositories>
    <repository>
      <id>bintray</id>
      <name>bintray.com</name>
      <url>https://dl.bintray.com/spark-packages/maven/</url>
    </repository>
</repositories>

EDIT:

According to https://spark.apache.org/news/new-repository-service.html

Bintray, the original repository service used for https://spark-packages.org/, is in its sunset process, and will no longer be available from May 1st. To consume artifacts from the new repository service, please replace “dl.bintray.com/spark-packages/maven” with “repos.spark-packages.org” in the Maven pom files or sbt build files in your repositories.

So this should work:

<repositories>
    <repository>
      <id>bintray</id>
      <name>bintray.com</name>
      <url>https://repos.spark-packages.org</url>
    </repository>
</repositories>

Upvotes: 3

RPD
RPD

Reputation: 41

Check your maven repo to verify that the file name and version matches what you've specified. Most Maven repo's give you an example of what to use, copy/paste.

ex: Sonatype Nexus is a repo that I use and they let you search and get snippets so you never have to worry about typing things wrong.

Upvotes: 0

Related Questions