使用ElasticSearch-Hadoop构建项目时出现构建失败

3

我无法构建一个使用ElasticSearch-Hadoop的Java项目。 当我尝试构建我的项目时,我看到了以下错误:

Scanning for projects...

------------------------------------------------------------------------
Building testES 1.0-SNAPSHOT
------------------------------------------------------------------------
The POM for cascading:cascading-local:jar:2.5.5 is missing, no dependency information available
The POM for cascading:cascading-hadoop:jar:2.5.5 is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 6.499s
Finished at: Mon Sep 08 11:29:08 IST 2014
Final Memory: 8M/19M
------------------------------------------------------------------------
Failed to execute goal on project testES: Could not resolve dependencies for 
project org.edge:testES:jar:1.0-SNAPSHOT: The following artifacts could not 
be resolved: cascading:cascading-local:jar:2.5.5, cascading:cascading-
hadoop:jar:2.5.5: Failure to find cascading:cascading-local:jar:2.5.5 in 
http://repo.maven.apache.org/maven2 was cached in the local repository, 
resolution will not be reattempted until the update interval of central has 
elapsed or updates are forced -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read  
the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

以下是项目POM文件中的依赖项:
<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.elasticsearch</groupId>
        <artifactId>elasticsearch-hadoop</artifactId>
        <version>2.1.0.Beta1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-core</artifactId>
        <version>1.2.1</version>
        <type>jar</type>
    </dependency>
</dependencies>

我有所疑惑,是否有遗漏?


上个星期我也遇到了同样的问题。看起来仓库在网站上失踪了。 - eliasah
1个回答

0

看起来你正在阻止Maven查看spring-source仓库,为了使其正常工作,请在你的pom.xml中添加以下代码片段

<project>
  ...
  <repositories>

    <repository>
      <id>spring-milestones</id>
      <url>http://repo.springsource.org/libs-milestone/</url>
    </repository>

  </repositories>
  ...
</project>

我尝试了你的建议,但现在它无法找到其他存储库中可用的工件(即junit、elasticsearch-hadoop和hadoop-core)。即使在pom.xml文件中添加以下内容,我仍然会得到以下错误: <repositories> <repository> <id>spring-milestones</id> <url>http://repo.springsource.org/libs-milestone/</url> </repository> central http://repo.maven.apache.org/maven2/ </repositories> - user1882391
在项目testES上执行目标失败:无法解决依赖项org.edge:testES:jar:1.0-SNAPSHOT,收集依赖项失败 [junit:junit:jar:3.8.1 (test), org.elasticsearch:elasticsearch-hadoop:jar:2.1.0.Beta1 (compile), org.apache.hadoop:hadoop-core:jar:1.2.1 (compile)],读取cascading:cascading-local:jar:2.5.5的构件描述文件失败:无法从spring-milestones(http://repo.springsource.org/libs-milestone/)传输cascading:cascading-local:pom:2.5.5的构件:未经授权,ReasonPhrase:Unauthorized -> [Help 1] - user1882391

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接