pom.xml 7.4 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
		<relativePath>..</relativePath>
	</parent>

	<artifactId>flink-s3-fs-hadoop</artifactId>
31
	<name>Flink : FileSystems : S3 FS Hadoop</name>
32 33 34

	<packaging>jar</packaging>

35 36
	<dependencyManagement>
		<dependencies>
37 38
			<!-- Override the flink-parent dependencyManagement definition for hadoop-common to ensure
				${fs.hadoopshaded.version} is used for this file system -->
39 40 41 42 43
			<dependency>
				<groupId>org.apache.hadoop</groupId>
				<artifactId>hadoop-common</artifactId>
				<version>${fs.hadoopshaded.version}</version>
			</dependency>
44 45 46 47 48 49 50

			<!-- aws-sdk requires httpclient >= 4.5.9 due to api compatibility breakage -->
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>4.5.9</version>
			</dependency>
51 52
		</dependencies>
	</dependencyManagement>
53 54
	<dependencies>

55
		<!-- Flink's file system abstraction (compiled against, not bundled) -->
56 57 58 59 60 61 62
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

63
		<!-- S3 base -->
64 65
		<dependency>
			<groupId>org.apache.flink</groupId>
66
			<artifactId>flink-s3-fs-base</artifactId>
67 68 69
			<version>${project.version}</version>
		</dependency>

70 71 72 73 74
		<dependency>
			<!-- Hadoop requires jaxb-api for javax.xml.bind.JAXBException -->
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>${jaxb.api.version}</version>
75
			<!-- packaged as an optional dependency that is only accessible on Java 11+ -->
76 77 78
			<scope>provided</scope>
		</dependency>

79
		<!-- for the behavior test suite -->
80
		<dependency>
81 82 83 84 85
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
			<type>test-jar</type>
86 87
		</dependency>

88 89 90 91 92 93 94
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-hadoop-fs</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>
95
	</dependencies>
96 97 98

	<build>
		<plugins>
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<archive>
						<manifestEntries>
							<!-- jaxb-api is packaged as an optional dependency that is only accessible on Java 11 -->
							<Multi-Release>true</Multi-Release>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-javax-jars</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<artifactItems>
						<artifactItem>
							<groupId>javax.xml.bind</groupId>
							<artifactId>jaxb-api</artifactId>
							<version>${jaxb.api.version}</version>
							<type>jar</type>
							<overWrite>true</overWrite>
						</artifactItem>
					</artifactItems>
					<outputDirectory>${project.build.directory}/temporary</outputDirectory>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack-javax-libraries</id>
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<echo message="unpacking javax jars"/>
								<unzip dest="${project.build.directory}/classes/META-INF/versions/11">
									<fileset dir="${project.build.directory}/temporary">
										<include name="*"/>
									</fileset>
								</unzip>
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>

169 170 171 172 173 174 175 176 177 178 179
			<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>
180
							<shadeTestJar>false</shadeTestJar>
181 182 183 184 185 186
							<artifactSet>
								<includes>
									<include>*:*</include>
								</includes>
							</artifactSet>
							<relocations>
187
								<!-- shade Flink's Hadoop FS adapter classes, forces plugin classloader for them -->
188
								<relocation>
189 190
									<pattern>org.apache.flink.runtime.fs.hdfs</pattern>
									<shadedPattern>org.apache.flink.fs.s3hadoop.common</shadedPattern>
191
								</relocation>
192
								<!-- shade Flink's Hadoop FS utility classes, forces plugin classloader for them -->
193 194 195 196
								<relocation>
									<pattern>org.apache.flink.runtime.util</pattern>
									<shadedPattern>org.apache.flink.fs.s3hadoop.common</shadedPattern>
								</relocation>
197 198 199 200 201 202 203 204
							</relocations>
							<filters>
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>META-INF/maven/org.apache.flink/force-shading/**</exclude>
									</excludes>
								</filter>
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>.gitkeep</exclude>
										<exclude>mime.types</exclude>
										<exclude>mozilla/**</exclude>
										<exclude>META-INF/maven/**</exclude>
										<exclude>META-INF/LICENSE.txt</exclude>
									</excludes>
								</filter>
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>properties.dtd</exclude>
										<exclude>PropertyList-1.0.dtd</exclude>
										<exclude>META-INF/maven/**</exclude>
										<exclude>META-INF/services/javax.xml.stream.*</exclude>
										<exclude>META-INF/LICENSE.txt</exclude>
									</excludes>
								</filter>
225 226 227 228 229 230 231 232 233
								<filter>
									<artifact>com.amazonaws:aws-java-sdk-s3</artifact>
									<!-- Make sure we are using the overridden XmlResponsesSaxParser of flink-s3-fs-base.
										Filter must be removed as soon as XmlResponsesSaxParser of this module is
										dropped, for example when discontinuing support for Java 8. -->
									<excludes>
										<exclude>com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser**</exclude>
									</excludes>
								</filter>
234 235 236 237 238 239 240
							</filters>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
241

242
</project>