我正在尝试遵循MapR / Hadoop教程,当我引用此依赖项时,它会说缺少工件。有关如何解决此问题的任何建议吗?
<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>
它突出了依赖性并说:缺少工件org.apache.hadoop:hadoop-core:jar:1.0.3-mapr-2.1.2.1
教程没有说明如果发生这种情况该怎么做:/
答案 0 :(得分:1)
1.0.3-mapr-2.1.2.1
不是中央存储库中的有效版本。尝试将依赖项更新为:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.0.3</version>
</dependency>
或者更好的是,如果该示例仍将编译,则为hadoop-core
的最新版本:
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.2.0</version>
</dependency>
修改强>
您可以通过中央仓库检查版本:
http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22hadoop-core%22