[FLINK-6139] [build] Add "mapr" build profile 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.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/a84aa3cd Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/a84aa3cd Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/a84aa3cd Branch: refs/heads/master Commit: a84aa3cd30627e304ea67c38834e1151a335ad09 Parents: aa207ef Author: Tzu-Li (Gordon) Tai <[email protected]> Authored: Wed Mar 22 15:14:03 2017 +0800 Committer: Tzu-Li (Gordon) Tai <[email protected]> Committed: Wed Mar 22 22:51:24 2017 +0800 ---------------------------------------------------------------------- .../flink-shaded-hadoop2/pom.xml | 156 +++++++++++++++++++ pom.xml | 36 +++++ 2 files changed, 192 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/a84aa3cd/flink-shaded-hadoop/flink-shaded-hadoop2/pom.xml ---------------------------------------------------------------------- diff --git a/flink-shaded-hadoop/flink-shaded-hadoop2/pom.xml b/flink-shaded-hadoop/flink-shaded-hadoop2/pom.xml index 86f3f91..c750bbd 100644 --- a/flink-shaded-hadoop/flink-shaded-hadoop2/pom.xml +++ b/flink-shaded-hadoop/flink-shaded-hadoop2/pom.xml @@ -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> http://git-wip-us.apache.org/repos/asf/flink/blob/a84aa3cd/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 5fba16c..17984d3 100644 --- a/pom.xml +++ b/pom.xml @@ -522,6 +522,42 @@ under the License. </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> <dependencies>
