添加新maven 公共repository

最近公司hadoop集群准备升级到CHD4U6,要进行升级前的job测试。需要依赖一些新的公共jar包,比如:

  1. hadoop-annotations-2.0.0-cdh4.6.0.jar
  2. hadoop-auth-2.0.0-cdh4.6.0.jar
  3. hadoop-common-2.0.0-cdh4.6.0.jar

与之前的hadoop版本(chd3u5)依赖不同。但用nexus搭建的maven库并没有创建该公共repository代理。

       查得:http://www.cloudera.com/content/cloudera-content/cloudera-docs/CDH4/4.2.1/CDH4-Installation-Guide/cdh4ig_topic_31.html

       根据其中描述得到id:cloudera, remote storage location:https://repository.cloudera.com/artifactory/cloudera-repos/,于是创建代理。

      

       创建后编译不行,看了下setting文件:



  
    
      normal
      true
      http
	  Deployment 
      10.16.1.240:8081/nexus
      
      10.16.1.240:8081/nexus
    
  

  
	
      releases
	  Deployment
    
	
      snapshots
	  Deployment
    
  

  
    
      
      nexus-public-snapshots
      public-snapshots
      http://10.16.1.240:8081/nexus/content/groups/public-snapshots
    
    
      
      nexus
      *
      http://10.16.1.240:8081/nexus/content/groups/public
    
  
  
  
    
      development
      
        
          central
          http://central
          true
          true
        
      
     
        
          central
          http://central
          true
          true
        
      
    
    
      
      public-snapshots
      
        
          public-snapshots
          http://public-snapshots
          false
          true
        
      
     
        
          public-snapshots
          http://public-snapshots
          false
          true
        
      
    
  
  
    development
  


其中红字部分可以看出指向了public这个group,于是在nexus中把刚创建的repository加入group。编译ok。

你可能感兴趣的:(Maven)