hadoop依赖

hadoop-common包依赖了servlet-api, jasper-runtime等可能与当前环境冲突的jar包,由于这些都是通过依赖关系链产生的关系,所以非常不容易被察觉。

  1. <dependency>  
  2.     <groupId>org.apache.hadoop</groupId>  
  3.     <artifactId>hadoop-common</artifactId>  
  4.     <version>2.2.0</version>  
  5.     <exclusions>  
  6.         <exclusion>  
  7.             <artifactId>servlet-api</artifactId>  
  8.             <groupId>javax.servlet</groupId>  
  9.         </exclusion>  
  10.         <exclusion>  
  11.             <artifactId>jasper-compiler</artifactId>  
  12.             <groupId>tomcat</groupId>  
  13.         </exclusion>  
  14.         <exclusion>  
  15.             <artifactId>jasper-runtime</artifactId>  
  16.             <groupId>tomcat</groupId>  
  17.         </exclusion>  
  18.         <exclusion>  
  19.             <artifactId>jsp-api</artifactId>  
  20.             <groupId>javax.servlet.jsp</groupId>  
  21.         </exclusion>  
  22.     </exclusions>  
  23. </dependency>  
  24.   
  25. <dependency>  
  26.     <groupId>org.apache.hadoop</groupId>  
  27.     <artifactId>hadoop-hdfs</artifactId>  
  28.     <version>2.2.0</version>  
  29.     <exclusions>  
  30.         <exclusion>  
  31.             <artifactId>servlet-api</artifactId>  
  32.             <groupId>javax.servlet</groupId>  
  33.         </exclusion>  
  34.     </exclusions>  
  35. </dependency>  

猜你喜欢

转载自dapeng.iteye.com/blog/2415372

相关文章