The program that has been developed Hadoop2.2.0 with Maven before. Environment changed to CDH5.2 after the error, found that Maven relies on the library problem.
have been using http://mvnrepository.com/to find Maven dependencies before. But such sites can only find generic maven dependencies, not including CDH dependencies. Fortunately Cloudera provides a CDH dependency:
Http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cdh_vd_cdh5_maven_repo.html
In short, add the following two parts to the pom file: 1. Libraries pointing to Cloudera <repositories> <repository> <ID>
cloudera</ID> <URL>https://repository.cloudera.com/artifactory/cloudera-repos/</url< /c10>> </repository> </repositories>
2.CDH dependent, for example <dependency> <groupId>org.apache.hadoop</groupId> <artifactid>
hadoop-common</artifactid> <version>2.5.0-cdh5.2.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactid>
hadoop-hdfs</artifactid> <version>2.5.0-cdh5.2.0</version> </dependency> <dependency> <groupId>org.apache.hadoop</groupId> <artifactid>
hadoop-maven-plugins</artifactid > <version>2.5.0-cdh5.2.0</version> </dependency> <dependency> <groupId>org.apache.hbase</groupId> <artifactid>
hbase-client</artifactid> <version>0.98.6-cdh5.2.0</version> </dependency>
Many other CDH dependencies please refer to http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cdh_vd_cdh5_maven_repo.html
"Gandalf" CDH5.2 's maven dependency