If you want to build applications or tools for use with CDH 5 components and you are using Maven or Ivy for dependency management, you can pull the CDH 5 artifacts from the Cloudera
Maven repository. The repository is available at https://repository.cloudera.com/artifactory/cloudera-repos/ .
Important: When you build an application JAR, do not include CDH JARs, because they are
already provided. If you do, upgrading CDH can break your application. To avoid this situation, set the Maven dependency scope to provided . If you have already built applications which include the CDH JARs, update the dependency to set scope to provided and recompile.
Important: If your cluster hosts are running CDH 5.16.x and the Ubuntu 16.04 or Debian 9 operating system and you
are using the OpenJDK SDK to compile applications, note the following:
The following OpenJDK versions will cause the Maven Surefire plug-in to fail:
Ubuntu 16.04: 8u181-b13-1ubuntu0.16.04.1
Debian 9: 8u181-b13-2~deb9u1
with the following error message:
Error: Could not find or load main class org.apache.maven.surefire.booter.ForkedBooter
Cloudera recommends that you use an earlier version of OpenJDK to compile your applications.
For more information, see the following bug reports:
The following is a sample POM (pom.xml ) file:
<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/maven-v4_0_0.xsd">
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
</project>