无法为 spark-cloudant 加载 Maven 依赖项。获取丢失的工件 cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11
Not able to load maven depedency for spark-cloudant. getting Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11
在 Java 我在下面添加 maven 依赖项,
<dependency>
<groupId>cloudant-labs</groupId>
<artifactId>spark-cloudant</artifactId>
<version>2.0.0-s_2.11</version>
</dependency>
但即使在显示以下错误的 pom.xml 文件中它也没有加载包,
Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11
任何人都可以帮助我,为什么会导致问题?
我可以添加另一个 Maven 依赖项,但特别是这不起作用..
检查您的 Maven 存储库以验证文件名和版本是否与您指定的相匹配。大多数 Maven 存储库都为您提供了使用示例,copy/paste.
例如:Sonatype Nexus 是我使用的一个存储库,它们可以让您搜索和获取片段,因此您永远不必担心输入错误。
它不在官方 Maven 存储库中。 (http://search.maven.org/#search%7Cga%7C1%7Cspark-cloudant)
但是当你检查时:https://mvnrepository.com/artifact/cloudant-labs/spark-cloudant/2.0.0-s_2.11有注释:
Note: this artifact it located at Spark Packages repository
(https://dl.bintray.com/spark-packages/maven/)
因此您需要在 pom.xml
中添加以下内容:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://dl.bintray.com/spark-packages/maven/</url>
</repository>
</repositories>
编辑:
根据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.
所以这应该有效:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://repos.spark-packages.org</url>
</repository>
</repositories>
在 Java 我在下面添加 maven 依赖项,
<dependency>
<groupId>cloudant-labs</groupId>
<artifactId>spark-cloudant</artifactId>
<version>2.0.0-s_2.11</version>
</dependency>
但即使在显示以下错误的 pom.xml 文件中它也没有加载包,
Missing artifact cloudant-labs:spark-cloudant:jar:2.0.0-s_2.11
任何人都可以帮助我,为什么会导致问题?
我可以添加另一个 Maven 依赖项,但特别是这不起作用..
检查您的 Maven 存储库以验证文件名和版本是否与您指定的相匹配。大多数 Maven 存储库都为您提供了使用示例,copy/paste.
例如:Sonatype Nexus 是我使用的一个存储库,它们可以让您搜索和获取片段,因此您永远不必担心输入错误。
它不在官方 Maven 存储库中。 (http://search.maven.org/#search%7Cga%7C1%7Cspark-cloudant)
但是当你检查时:https://mvnrepository.com/artifact/cloudant-labs/spark-cloudant/2.0.0-s_2.11有注释:
Note: this artifact it located at Spark Packages repository (https://dl.bintray.com/spark-packages/maven/)
因此您需要在 pom.xml
中添加以下内容:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://dl.bintray.com/spark-packages/maven/</url>
</repository>
</repositories>
编辑:
根据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.
所以这应该有效:
<repositories>
<repository>
<id>bintray</id>
<name>bintray.com</name>
<url>https://repos.spark-packages.org</url>
</repository>
</repositories>