简体   繁体   中英

The following artifacts could not be resolved: org.apache.hbase:hbase:jar:0.96.1.1-hadoop2

I try to take the following steps: right click on pom.xml and run as maven install in eclipse but I got this error:

[ERROR] Failed to execute goal on project tt: Could not resolve dependencies for project com.sunshineatnoon:tt:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.apache.hbase:hbase:jar:0.96.1.1-hadoop2, com.yahoo.ycsb:core:jar:0.1.4: Failure to find org.apache.hbase:hbase:jar:0.96.1.1-hadoop2 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]

however, when I looked into http://repo.maven.apache.org/maven2 , there indeed exists this org.apache.hbase:hbase:jar:0.96.1.1-hadoop2.

My pom.xml is as follows:

<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>com.sunshineatnoon</groupId>
  <artifactId>tt</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <dependencies>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase</artifactId>
      <version>0.96.1.1-hadoop2</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>2.2.0</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.ycsb</groupId>
      <artifactId>core</artifactId>
      <version>0.1.4</version>
    </dependency>
  </dependencies>

</project>

How can I solve this problem?Any help will be appreciated, thanks in advance!

Maven pulls all the dependencies to your local machine. The default path would be ${USER_HOME}/.m2/repository. Here you should see whether the following dependencies really exist. Also are you using multiple repositories? Maven will place files under folders where it thinks there's a conflict "_maven.repositories" I normally delete these as it creates the above error as well.

org.apache.hbase:hbase:jar:0.96.1.1-hadoop2
${USER_HOME}/.m2/repository/org/apache/hbase/hbase/0.96.1.1-hadoop2

com.yahoo.ycsb:core:jar:0.1.4
${USER_HOME}/.m2/repository/com/yahoo/ycsb/core/0.1.4

The artifact hbase-0.96.1.1-hadoop2 does not exist. The hbase module was divided into multiple children as of version 0.96.

  hbase =>  hbase-client, hbase-protocol, hbase-server, hbase-examples ..

You will need to reference hbase-(client|protocol|server|examples|etc)-0.96.1.1-hadoop2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM