pom.xml 7.0 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at
  http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
-->
<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">

	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>org.apache.flink</groupId>
		<artifactId>flink-filesystems</artifactId>
P
Piotr Nowojski 已提交
26
		<version>1.12-SNAPSHOT</version>
27 28 29 30 31 32 33 34 35 36 37 38
		<relativePath>..</relativePath>
	</parent>

	<artifactId>flink-azure-fs-hadoop</artifactId>
	<name>flink-azure-fs-hadoop</name>

	<packaging>jar</packaging>

	<!-- need to use a release which includes this patch: https://github.com/apache/hadoop/commit/02cadbd24bf69925078d044701741e2e3fcb4b2f -->
	<properties>
		<fs.azure.sdk.version>1.16.0</fs.azure.sdk.version>
		<fs.jackson.core.version>2.9.4</fs.jackson.core.version>
39
		<jetty.version>9.3.24.v20180605</jetty.version>
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
	</properties>

	<dependencies>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-hadoop-fs</artifactId>
			<version>${project.version}</version>
		</dependency>

		<dependency>
58 59 60
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-fs-hadoop-shaded</artifactId>
			<version>${project.version}</version>
61 62 63 64
		</dependency>

		<dependency>
			<groupId>org.apache.hadoop</groupId>
65 66 67 68 69 70 71 72
			<artifactId>hadoop-azure</artifactId>
			<version>${fs.hadoopshaded.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.apache.hadoop</groupId>
					<artifactId>hadoop-common</artifactId>
				</exclusion>
			</exclusions>
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
		</dependency>

		<!-- for Azure IT tests to check if HTTP endpoints are enabled / not -->
		<dependency>
			<groupId>com.microsoft.azure</groupId>
			<artifactId>azure</artifactId>
			<version>${fs.azure.sdk.version}</version>
			<scope>test</scope>
		</dependency>

		<!-- for the behavior test suite -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>

	</dependencies>

94 95 96 97 98 99 100 101 102 103 104
	<dependencyManagement>
		<dependencies>
			<dependency>
				<!-- Pulled in by hadoop-azure; bumps it to the version used by 3.1.2+ for security purposes -->
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-util-ajax</artifactId>
				<version>${jetty.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
	<build>
		<plugins>
			<!-- Relocate all Azure related classes -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<id>shade-flink</id>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<shadeTestJar>false</shadeTestJar>
							<artifactSet>
								<includes>
									<include>*:*</include>
								</includes>
							</artifactSet>
							<relocations>
126
								<!-- relocate the references to Hadoop to match the shaded Hadoop config -->
127 128
								<relocation>
									<pattern>org.apache.hadoop</pattern>
129
									<shadedPattern>org.apache.flink.fs.shaded.hadoop3.org.apache.hadoop</shadedPattern>
130
								</relocation>
131 132 133 134 135 136 137 138

								<!-- shade dependencies internally used by Hadoop and never exposed downstream -->
								<relocation>
									<pattern>org.apache.commons</pattern>
									<shadedPattern>org.apache.flink.fs.shaded.hadoop3.org.apache.commons</shadedPattern>
								</relocation>

								<!-- relocate the Azure dependencies -->
139
								<relocation>
140 141 142 143 144 145
									<pattern>com.microsoft.azure</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.com.microsoft.azure</shadedPattern>
								</relocation>

								<!-- shade dependencies internally used by Azure and never exposed downstream -->
								<relocation>
146 147
									<pattern>org.apache.http</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.org.apache.http</shadedPattern>
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
								</relocation>
								<relocation>
									<pattern>commons-logging</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.commons-logging</shadedPattern>
								</relocation>
								<relocation>
									<pattern>commons-codec</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.commons-codec</shadedPattern>
								</relocation>
								<relocation>
									<pattern>com.fasterxml</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.com.fasterxml</shadedPattern>
								</relocation>
								<relocation>
									<pattern>com.google</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.com.google</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.eclipse</pattern>
									<shadedPattern>org.apache.flink.fs.azure.shaded.org.eclipse</shadedPattern>
								</relocation>

								<!-- shade Flink's Hadoop FS adapter classes  -->
								<relocation>
									<pattern>org.apache.flink.runtime.fs.hdfs</pattern>
									<shadedPattern>org.apache.flink.fs.azure.common.hadoop</shadedPattern>
								</relocation>
								<!-- shade Flink's Hadoop FS utility classes -->
								<relocation>
									<pattern>org.apache.flink.runtime.util</pattern>
									<shadedPattern>org.apache.flink.fs.azure.common</shadedPattern>
179 180 181
								</relocation>
							</relocations>
							<filters>
182 183 184 185 186 187 188
								<filter>
									<artifact>org.apache.flink:flink-hadoop-fs</artifact>
									<excludes>
										<exclude>org/apache/flink/runtime/util/HadoopUtils</exclude>
										<exclude>org/apache/flink/runtime/fs/hdfs/HadoopRecoverable*</exclude>
									</excludes>
								</filter>
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>properties.dtd</exclude>
										<exclude>PropertyList-1.0.dtd</exclude>
										<exclude>mozilla/**</exclude>
										<exclude>META-INF/maven/**</exclude>
										<exclude>META-INF/LICENSE.txt</exclude>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
							</filters>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>