关闭

eclipse里面添加hive maven相关依赖报错

1563人阅读 评论(0) 收藏 举报
分类:

首先贴我的hive 相关依赖


<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.crxy.hive</groupId>
  <artifactId>hive</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>jar</packaging>


  <name>hive</name>
  <url>http://maven.apache.org</url>


  <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <hive-api.version>0.14.0</hive-api.version>
      <hadoop-api.version>2.6.0</hadoop-api.version>
      <hadoop-core.version>1.2.1</hadoop-core.version>
      <JAVA_HOME>D:\java\jdk1.8.0\lib</JAVA_HOME>
    </properties>
    <dependencies>
    <!-- log4j -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.12</version>
</dependency>
    <dependency>  
            <groupId>org.apache.hadoop</groupId>  
            <artifactId>hadoop-common</artifactId>  
            <version>${hadoop-api.version}</version>  
        </dependency>
    <dependency>
            <groupId>org.apache.hadoop</groupId>  
            <artifactId>hadoop-mapreduce-client-core</artifactId>  
            <version>${hadoop-api.version}</version>  
        </dependency>
    <dependency>  
            <groupId>org.apache.hadoop</groupId>  
            <artifactId>hadoop-core</artifactId>  
            <version>${hadoop-core.version}</version>  
        </dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-exec</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-serde</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-service</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-metastore</artifactId>
<version>${hive-api.version}</version>
</dependency>

<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-common</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-cli</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>${hive-api.version}</version>
</dependency>
<dependency>
<groupId>org.apache.thrift</groupId>
<artifactId>libfb303</artifactId>
<version>0.9.0</version>
</dependency>


<dependency>
  <groupId>org.apache.calcite</groupId>
    <artifactId>calcite-avatica</artifactId>
    <version>0.9.2-incubating</version>
 </dependency>
 
  <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-core</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>

    </dependencies>
     <build>
    <plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>utf-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
    </build>
    

  第一个错误就是找不到Missing artifact jdk.tools:jdk.tools:jar:1.6

 解决:在pom.xml里添加具体的路径名
<dependency>  
     <groupId>jdk.tools</groupId>  
      <artifactId>jdk.tools</artifactId>  
     <version>1.6</version>  
     <scope>system</scope>  
     <systemPath>D:/java/jdk1.8.0/lib/tools.jar</systemPath>  
</dependency>

</project>


第二个错误就是可能会报各种找不到miss 

先用search everything 找到在自己maven仓库里的以.lastUpdated结尾的文件,把他们全部删除

再再maven工程里面update project 


第三个错就是

错误:

Multiple markers at this line
- Missing artifact org.apache.calcite:calcite-core:jar:0.9.2-incubating-SNAPSHOT
- Missing artifact org.apache.calcite:calcite-avatica:jar:0.9.2-incubating-SNAPSHOT

解决方法是再添加两个引用

 <dependency>
            <groupId>org.apache.hive</groupId>
            <artifactId>hive-exec</artifactId>
            <version>0.14.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-core</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-avatica</artifactId>
            <version>0.9.2-incubating</version>
        </dependency>



1
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:15267次
    • 积分:304
    • 等级:
    • 排名:千里之外
    • 原创:6篇
    • 转载:30篇
    • 译文:5篇
    • 评论:1条
    文章分类