我在使用Maven的POM文件时遇到了问题,它无法找到Spark依赖项并返回错误: Failed to read artifact descriptor for org.apache.spark:spark-streaming-kafka_2.10:jar:1.2.1
我确认这不是任何公司防火墙的问题,因为每个其他依赖项都正常加载,只有这个出问题。
我也已经确认在我的Maven设置中它正在尝试从以下存储库拉取。 我尝试删除本地机器上的.m2存储库以重新加载它,但仍然无法解决。
http://repo.maven.apache.org/maven2/org/apache/spark/spark-streaming-kafka_2.10/1.2.1/
我的pom文件如下所示:
<groupId>my.group.id</groupId>
<artifactId>sentiment</artifactId>
<version>1.0-SNAPSHOT</version>
<name>NPITWITTER</name>
<properties>
</properties>
<dependencies>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming-kafka_2.10</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.10</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.10</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_2.10</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-sql_2.10</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>