pom.xml 26.2 KB
Newer Older
S
sewen 已提交
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
3 4 5 6 7 8 9
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
10

11
  http://www.apache.org/licenses/LICENSE-2.0
12

13 14 15 16 17 18
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.
19
-->
20
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
S
sewen 已提交
22

S
sewen 已提交
23
	<modelVersion>4.0.0</modelVersion>
S
sewen 已提交
24

S
sewen 已提交
25
	<parent>
26 27
		<groupId>org.apache.flink</groupId>
		<artifactId>flink-parent</artifactId>
G
Gary Yao 已提交
28
		<version>1.11-SNAPSHOT</version>
29
		<relativePath>..</relativePath>
S
sewen 已提交
30
	</parent>
S
sewen 已提交
31

32
	<artifactId>flink-dist_${scala.binary.version}</artifactId>
33
	<name>flink-dist</name>
34
	<packaging>jar</packaging>
S
sewen 已提交
35

36 37 38 39
	<properties>
		<zookeeper.optional.version>3.5.6</zookeeper.optional.version>
	</properties>

S
sewen 已提交
40
	<dependencies>
41

42 43
		<!-- Flink project binaries -->

S
sewen 已提交
44
		<dependency>
45 46
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
47 48
			<version>${project.version}</version>
		</dependency>
49

50
		<dependency>
51 52
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
53 54
			<version>${project.version}</version>
		</dependency>
55 56

		<dependency>
57
			<groupId>org.apache.flink</groupId>
58
			<artifactId>flink-scala_${scala.binary.version}</artifactId>
59 60 61 62
			<version>${project.version}</version>
		</dependency>

		<dependency>
63
			<groupId>org.apache.flink</groupId>
64
			<artifactId>flink-runtime_${scala.binary.version}</artifactId>
65 66 67
			<version>${project.version}</version>
		</dependency>

68 69
		<dependency>
			<groupId>org.apache.flink</groupId>
70
			<artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
71 72 73
			<version>${project.version}</version>
		</dependency>

74
		<dependency>
75
			<groupId>org.apache.flink</groupId>
76
			<artifactId>flink-optimizer_${scala.binary.version}</artifactId>
77 78 79 80
			<version>${project.version}</version>
		</dependency>

		<dependency>
81
			<groupId>org.apache.flink</groupId>
82
			<artifactId>flink-clients_${scala.binary.version}</artifactId>
83 84 85
			<version>${project.version}</version>
		</dependency>

86 87
		<dependency>
			<groupId>org.apache.flink</groupId>
88
			<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
89 90 91 92 93
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
94
			<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
95 96
			<version>${project.version}</version>
		</dependency>
97

98 99 100 101 102 103
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-core</artifactId>
			<version>${project.version}</version>
		</dependency>

104 105
		<dependency>
			<groupId>org.apache.flink</groupId>
106
			<artifactId>flink-metrics-jmx_${scala.binary.version}</artifactId>
107 108
			<version>${project.version}</version>
		</dependency>
109 110 111
        
		<dependency>
			<groupId>org.apache.flink</groupId>
112
			<artifactId>flink-mesos_${scala.binary.version}</artifactId>
113
			<version>${project.version}</version>
114 115 116 117 118 119
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-container_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
120 121 122 123
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
124
			<artifactId>flink-statebackend-rocksdb_${scala.binary.version}</artifactId>
125 126
			<version>${project.version}</version>
		</dependency>
127

128 129 130 131 132 133
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-kubernetes_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
		</dependency>

134 135
		<dependency>
			<groupId>org.apache.flink</groupId>
136
			<artifactId>flink-yarn_${scala.binary.version}</artifactId>
137
			<version>${project.version}</version>
138 139 140
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
141
					<artifactId>flink-shaded-hadoop-2</artifactId>
142 143
				</exclusion>
			</exclusions>
144
		</dependency>
145

146 147 148 149 150 151 152 153
		<!-- Default file system support. The Hadoop and MapR dependencies -->
		<!--       are optional, so not being added to the dist jar        -->

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

155 156 157 158 159 160
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-mapr-fs</artifactId>
			<version>${project.version}</version>
		</dependency>

161
		<!-- Concrete logging framework - we add this only here (and not in the 
162
			root POM) to not tie the projects to one specific framework and make
163
			it easier for users to swap logging frameworks -->
164 165

		<dependency>
166 167
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
168 169 170 171
			<scope>compile</scope>
		</dependency>

		<dependency>
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<!-- API bridge between log4j 1 and 2; included for convenience -->
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-1.2-api</artifactId>
187 188
			<scope>compile</scope>
		</dependency>
189

190 191 192 193 194 195
		<!--
			The following dependencies are packaged in 'examples/'
			The scope of these dependencies needs to be 'provided' so that
			they are not included into the 'flink-dist' uber jar.
		-->

196 197 198 199 200 201 202 203 204 205 206 207 208 209
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-examples-batch_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-examples-streaming_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

210 211
		<dependency>
			<groupId>org.apache.flink</groupId>
212 213 214 215 216 217 218 219 220 221 222 223 224 225
			<artifactId>flink-examples-streaming-state-machine_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-examples-streaming-twitter_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
226
			<artifactId>flink-gelly-examples_${scala.binary.version}</artifactId>
227 228 229 230
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

231 232 233 234 235 236 237
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-examples-table_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

238 239 240 241 242
		<!--
			The following dependencies are packaged in 'opt/' 
			The scope of these dependencies needs to be 'provided' so that
			they are not included into the 'flink-dist' uber jar.
		-->
243 244 245 246 247 248

		<!-- start optional Flink metrics reporters -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-dropwizard</artifactId>
			<version>${project.version}</version>
249
			<scope>provided</scope>
250 251 252 253 254 255
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-graphite</artifactId>
			<version>${project.version}</version>
256
			<scope>provided</scope>
257 258
		</dependency>

A
ap 已提交
259 260 261 262 263 264 265
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-influxdb_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

266 267
		<dependency>
			<groupId>org.apache.flink</groupId>
268
			<artifactId>flink-metrics-prometheus_${scala.binary.version}</artifactId>
269 270 271 272
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

273 274 275 276
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-statsd</artifactId>
			<version>${project.version}</version>
277
			<scope>provided</scope>
278
		</dependency>
279 280 281 282 283 284 285

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-datadog</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
286 287 288 289 290 291 292

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-slf4j</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
293 294 295
		<!-- end optional Flink metrics reporters -->

		<!-- start optional Flink libraries -->
296

297 298
		<dependency>
			<groupId>org.apache.flink</groupId>
299
			<artifactId>flink-cep_${scala.binary.version}</artifactId>
300
			<version>${project.version}</version>
301
			<scope>provided</scope>
302 303 304 305
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
306
			<artifactId>flink-cep-scala_${scala.binary.version}</artifactId>
307
			<version>${project.version}</version>
308
			<scope>provided</scope>
309 310 311 312
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
313
			<artifactId>flink-gelly_${scala.binary.version}</artifactId>
314
			<version>${project.version}</version>
315
			<scope>provided</scope>
316 317 318 319
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
320
			<artifactId>flink-gelly-scala_${scala.binary.version}</artifactId>
321
			<version>${project.version}</version>
322
			<scope>provided</scope>
323 324
		</dependency>

325 326
		<dependency>
			<groupId>org.apache.flink</groupId>
327
			<artifactId>flink-table-uber_${scala.binary.version}</artifactId>
328
			<version>${project.version}</version>
329
			<scope>provided</scope>
330
		</dependency>
331

332 333 334 335 336 337 338
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-table-uber-blink_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

339 340
		<dependency>
			<groupId>org.apache.flink</groupId>
341
			<artifactId>flink-sql-client_${scala.binary.version}</artifactId>
342 343 344 345
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

346 347 348 349 350 351 352
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-state-processor-api_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

353 354 355 356 357 358 359
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-azure-fs-hadoop</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

360 361 362 363 364 365 366 367 368 369 370
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-s3-fs-hadoop</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-s3-fs-presto</artifactId>
			<version>${project.version}</version>
371 372 373 374 375 376 377
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-swift-fs-hadoop</artifactId>
			<version>${project.version}</version>
378 379 380
			<scope>provided</scope>
		</dependency>

381 382 383 384 385 386 387
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-oss-fs-hadoop</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

388 389 390 391 392 393
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-queryable-state-runtime_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
394 395 396

		<dependency>
			<groupId>org.apache.flink</groupId>
397
			<artifactId>flink-python_${scala.binary.version}</artifactId>
398 399 400
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
401 402 403 404 405 406

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-shaded-netty-tcnative-dynamic</artifactId>
			<scope>provided</scope>
		</dependency>
407 408 409 410 411 412 413

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-ml-uber_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
414
		<!-- end optional Flink libraries -->
415

416 417 418 419 420 421 422 423 424
		<dependency>
			<!-- some components require jaxb-api on Java 11+, which is no longer bundled with the JDK -->
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<!-- packaged as an optional dependency that is only accessible on Java 11+ -->
			<!-- this entry exists to prevent a compile dependency from slipping through -->
			<scope>provided</scope>
		</dependency>

425 426 427 428 429 430 431 432 433 434
		<dependency>
			<!-- transitive dependency of jaxb-api; added for clarity -->
			<groupId>javax.activation</groupId>
			<artifactId>javax.activation-api</artifactId>
			<version>1.2.0</version>
			<!-- packaged as an optional dependency that is only accessible on Java 11+ -->
			<!-- this entry exists to prevent a compile dependency from slipping through -->
			<scope>provided</scope>
		</dependency>

435 436 437 438 439 440 441
		<!-- test dependencies -->

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-test-utils-junit</artifactId>
		</dependency>
		<!-- end test dependencies -->
S
sewen 已提交
442 443
	</dependencies>

444
	<profiles>
445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462
		<profile>
			<id>scala-2.11</id>
			<activation>
				<property>
					<name>!scala-2.12</name>
				</property>
			</activation>
			<!-- Scala Shell doesn't currently work with Scala 2.12 so only include
			when building for Scala 2.11. -->
			<dependencies>
				<dependency>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-scala-shell_${scala.binary.version}</artifactId>
					<version>${project.version}</version>
				</dependency>
			</dependencies>
		</profile>

463 464 465 466 467
		<profile>
			<!-- Copies that shaded Hadoop uber jar to the dist folder. -->
			<id>include-hadoop</id>
			<activation>
				<property>
468
					<name>include-hadoop</name>
469 470
				</property>
			</activation>
471 472 473 474 475 476 477
			<dependencies>
				<!--
                    The Hadoop 2 Uber jar should not go into the Flink dist jar, but
                    sit next to it. Hence, we set it to 'provided' here.
                -->
				<dependency>
					<groupId>org.apache.flink</groupId>
478
					<artifactId>flink-shaded-hadoop-2-uber</artifactId>
479 480 481
					<scope>provided</scope>
				</dependency>
			</dependencies>
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<id>hadoop</id>
								<phase>package</phase>
								<goals>
									<goal>single</goal>
								</goals>
								<configuration>
									<descriptors>
										<descriptor>src/main/assemblies/hadoop.xml</descriptor>
									</descriptors>
									<finalName>flink-${project.version}-bin</finalName>
									<appendAssemblyId>false</appendAssemblyId>
								</configuration>
							</execution>
						</executions>
					</plugin>

				</plugins>
			</build>
		</profile>
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
		<profile>
			<!-- Creates/Removes the 'build-target' symlink in the root directory (only Unix systems) -->
			<id>symlink-build-target</id>
			<activation>
				<os>
					<family>unix</family>
				</os>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>1.5.0</version>
						<executions>
							<execution>
								<id>remove-build-target-link</id>
								<phase>clean</phase>
								<goals>
									<goal>exec</goal>
								</goals>
								<configuration>
									<executable>rm</executable>
									<arguments>
										<argument>-f</argument>
										<argument>${project.basedir}/../build-target</argument>
									</arguments>
								</configuration>
							</execution>
							<execution>
								<id>create-build-target-link</id>
								<phase>package</phase>
								<goals>
									<goal>exec</goal>
								</goals>
								<configuration>
									<executable>ln</executable>
									<arguments>
545
										<argument>-sfn</argument>
546 547 548 549 550 551 552 553 554 555 556
										<argument>${project.basedir}/target/flink-${project.version}-bin/flink-${project.version}</argument>
										<argument>${project.basedir}/../build-target</argument>
									</arguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

557
	</profiles>
558

S
sewen 已提交
559 560
	<build>
		<plugins>
561 562 563 564 565 566 567 568 569 570 571 572 573 574 575
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
				<executions>
					<execution>
						<id>dependency-convergence</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<skip>true</skip>
						</configuration>
					</execution>
				</executions>
			</plugin>
576

577 578 579 580 581 582 583 584 585 586 587 588 589 590
			<!--unit tests-->
			<!--plugin must appear BEFORE the shade-plugin to not mess up package order and include the non-uber JAR into the assembly-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<reuseForks>false</reuseForks>
					<!-- <workingDirectory>${project.build.testOutputDirectory}</workingDirectory> -->
					<systemPropertyVariables>
						<log.level>WARN</log.level>
					</systemPropertyVariables>
				</configuration>
			</plugin>

591 592 593 594 595 596 597 598 599 600
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
601 602 603 604 605 606 607 608
				<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>
609 610 611 612 613 614 615
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
616
						<id>copy-javax-jars</id>
617 618 619 620
						<phase>process-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>javax.xml.bind</groupId>
									<artifactId>jaxb-api</artifactId>
									<version>${jaxb.api.version}</version>
									<type>jar</type>
									<overWrite>true</overWrite>
								</artifactItem>
								<artifactItem>
									<groupId>javax.activation</groupId>
									<artifactId>javax.activation-api</artifactId>
									<version>${javax.activation.api.version}</version>
									<type>jar</type>
									<overWrite>true</overWrite>
								</artifactItem>
							</artifactItems>
638
							<outputDirectory>${project.build.directory}/temporary/java11_exclusive</outputDirectory>
639
						</configuration>
640
					</execution>
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659
					<execution>
						<id>copy-zk-jars</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.apache.flink</groupId>
									<artifactId>flink-shaded-zookeeper-3</artifactId>
									<version>${zookeeper.optional.version}-${flink.shaded.version}</version>
									<type>jar</type>
									<overWrite>true</overWrite>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${project.build.directory}/temporary</outputDirectory>
						</configuration>
					</execution>
660 661 662 663 664 665 666 667
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
668
						<id>bundle-java11-exclusive-dependencies</id>
669 670 671 672 673 674
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
675
								<echo message="bundling java11-exclusive dependencies"/>
676
								<unzip dest="${project.build.directory}/classes/META-INF/versions/11">
677
									<fileset dir="${project.build.directory}/temporary/java11_exclusive">
678 679 680
										<include name="*"/>
									</fileset>
								</unzip>
681 682 683 684 685 686
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>

687
			<!-- Build uber jar -->
688 689 690 691 692 693 694 695 696 697 698 699 700
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration combine.self="override">
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<shadedArtifactAttached>false</shadedArtifactAttached>
							<finalName>${project.artifactId}-${project.version}</finalName>
701 702 703 704 705 706 707
							<filters>
								<!-- Globally exclude log4j.properties from our JAR files. -->
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>log4j.properties</exclude>
										<exclude>log4j-test.properties</exclude>
708 709 710
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
711
										<exclude>org/apache/flink/runtime/util/BashJavaUtils.class</exclude>
712 713 714
									</excludes>
								</filter>
							</filters>
715 716
							<artifactSet>
								<excludes>
717 718
									<!-- log4j 2 is bundled separately from the flink-dist jar -->
									<exclude>org.apache.logging.log4j:*</exclude>
719 720
									<!-- Bundled separately so that users can easily switch between ZK 3.4/3.5-->
									<exclude>org.apache.flink:flink-shaded-zookeeper-3</exclude>
721 722 723 724 725 726 727 728
								</excludes>
							</artifactSet>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>reference.conf</resource>
								</transformer>
								<!-- The service transformer is needed to merge META-INF/services files -->
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
729 730
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
									<projectName>Apache Flink</projectName>
731
									<encoding>UTF-8</encoding>
732
								</transformer>
733 734 735
							</transformers>
						</configuration>
					</execution>
736 737 738 739 740 741 742 743 744
					<execution>
						<!--
						Disable inherited shade-flink to prevent the Shade plugin from changing the project.basedir. The basedir
						is changed by the Shade plugin when dependencyReducedPomLocation is set to a different location than the
						original basedir. We do that in the root pom.xml.
						-->
						<id>shade-flink</id>
						<phase>none</phase>
					</execution>
745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777
					<!-- Build BashJavaUtils jar -->
					<execution>
						<id>bash-utils</id>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration combine.self="override">
							<createDependencyReducedPom>false</createDependencyReducedPom>
							<shadedArtifactAttached>false</shadedArtifactAttached>
							<finalName>bash-java-utils</finalName>
							<filters>
								<!-- Globally exclude log4j.properties from our JAR files. -->
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>log4j.properties</exclude>
										<exclude>log4j-test.properties</exclude>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
								<!-- Include only the BashJavaUtils, other required classes should come from the flink-dist-->
								<filter>
									<artifact>org.apache.flink:*</artifact>
									<includes>
										<include>org/apache/flink/runtime/util/BashJavaUtils.class</include>
									</includes>
								</filter>
							</filters>
							<artifactSet>
								<includes>
778
									<exclude>org.apache.logging.log4j:*</exclude>
779 780 781 782
									<include>org.apache.flink:*</include>
								</includes>
							</artifactSet>
							<transformers>
783
								<!-- Include a log4j2 configuration that always prints to stdout -->
784
								<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
785
									<resource>log4j2.properties</resource>
786 787 788 789 790 791 792 793 794 795 796 797
									<file>src/main/resources/log4j-bash-utils.properties</file>
								</transformer>
								<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
									<resource>reference.conf</resource>
								</transformer>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
									<projectName>Apache Flink</projectName>
									<encoding>UTF-8</encoding>
								</transformer>
							</transformers>
						</configuration>
					</execution>
798 799 800
				</executions>
			</plugin>

S
sewen 已提交
801 802 803 804
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
805
						<id>bin</id>
S
sewen 已提交
806 807 808 809
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
810 811 812 813
						<configuration>
							<descriptors>
								<descriptor>src/main/assemblies/bin.xml</descriptor>
							</descriptors>
814 815
							<finalName>flink-${project.version}-bin</finalName>
							<appendAssemblyId>false</appendAssemblyId>
816
						</configuration>
S
sewen 已提交
817
					</execution>
818 819 820 821 822 823 824 825 826 827 828 829 830 831
					<execution>
						<id>opt</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<descriptors>
								<descriptor>src/main/assemblies/opt.xml</descriptor>
							</descriptors>
							<finalName>flink-${project.version}-bin</finalName>
							<appendAssemblyId>false</appendAssemblyId>
						</configuration>
					</execution>
S
sewen 已提交
832 833
				</executions>
			</plugin>
834

835 836 837
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
838
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
839 840 841 842
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
843

844 845 846 847 848 849 850 851 852 853 854 855 856 857
			<plugin>
				<!-- Description: https://github.com/ktoso/maven-git-commit-id-plugin -->
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>revision</goal>
						 </goals>
					</execution>
				</executions>
				<configuration>
					<dotGitDirectory>${project.basedir}/../.git</dotGitDirectory>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
858
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
859
					<skipPoms>false</skipPoms>
860
					<generateGitPropertiesFilename>src/main/flink-bin/.version.properties</generateGitPropertiesFilename>
861 862 863 864
					<gitDescribe>
						<!-- don't generate the describe property -->
						<skip>true</skip>
					</gitDescribe>
865 866
				</configuration>
			</plugin>
S
sewen 已提交
867 868
		</plugins>
	</build>
869

S
sewen 已提交
870
</project>