Skip to content

Commit

Permalink
[FLINK-6139] [build] Add "mapr" build profile
Browse files Browse the repository at this point in the history
This build profile is for building Flink to be compatible with MapR. It
additionally excludes dependency clashes between MapR's Hadoop /
Zookeeper distributions and Flink's dependencies.
  • Loading branch information
tzulitai committed Mar 22, 2017
1 parent aa207ef commit a84aa3c
Show file tree
Hide file tree
Showing 2 changed files with 192 additions and 0 deletions.
156 changes: 156 additions & 0 deletions flink-shaded-hadoop/flink-shaded-hadoop2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -652,4 +652,160 @@ under the License.
</dependency>
</dependencies>
</dependencyManagement>

<profiles>
<profile>
<!-- MapR build profile -->
<id>mapr</id>
<dependencies>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<!--
for MapR builds, we additionally exclude the MapR dependencies to not be
bundled with Flink, ensuring that the native MapR libraries will be used
and avoid incompatibitilies
-->
<exclusion>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.mapr.hadoop</groupId>
<artifactId>hadoop2</artifactId>
</exclusion>
<exclusion>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs</artifactId>
</exclusion>
<exclusion>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs-diagnostic-tools</artifactId>
</exclusion>
<exclusion>
<groupId>com.mapr.hadoop</groupId>
<artifactId>maprfs-jni</artifactId>
</exclusion>
<exclusion>
<groupId>com.mapr.fs</groupId>
<artifactId>libprotodefs</artifactId>
</exclusion>
<exclusion>
<groupId>com.mapr.fs</groupId>
<artifactId>mapr-hbase</artifactId>
</exclusion>

<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-2.1</artifactId>
</exclusion>

<exclusion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
</exclusion>
<exclusion>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
</exclusion>
<exclusion>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-server</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-compiler</artifactId>
</exclusion>
<exclusion>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-grizzly2</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey.jersey-test-framework</groupId>
<artifactId>jersey-test-framework-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-grizzly2</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-framework</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-server</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-rcm</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.grizzly</groupId>
<artifactId>grizzly-http-servlet</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-guice</artifactId>
</exclusion>
<!--We have to exclude beanutils because it is overlapping with commons-collections-->
<exclusion>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
36 changes: 36 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,42 @@ under the License.
</repositories>
</profile>

<profile>
<!--
MapR build profile. This build profile must be used together with "vendor-repos"
to be able to locate the MapR Hadoop / Zookeeper dependencies.
-->
<id>mapr</id>

<!--
use MapR Hadoop / Zookeeper dependencies appropriate for MapR 5.2.0;
users of different MapR versions should simply override these versions
with appropriate values.
-->
<properties>
<hadoop.version>2.7.0-mapr-1607</hadoop.version>
<zookeeper.version>3.4.5-mapr-1604</zookeeper.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>${zookeeper.version}</version>
<exclusions>
<!--
exclude netty, because MapR's Zookeeper distribution has
a conflicting Netty version with Flink's Netty dependency
-->
<exclusion>
<groupId>org.jboss.netty</groupId>
<artifactId>netty</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>

<profile>
<!-- used for aggregating ScalaDoc with JavaDoc -->
<id>aggregate-scaladoc</id>
Expand Down

0 comments on commit a84aa3c

Please sign in to comment.