pom.xml 24.8 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

S
sewen 已提交
36
	<dependencies>
37

38 39
		<!-- Flink project binaries -->

S
sewen 已提交
40
		<dependency>
41 42
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
43 44
			<version>${project.version}</version>
		</dependency>
45

46
		<dependency>
47 48
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
49 50
			<version>${project.version}</version>
		</dependency>
51 52

		<dependency>
53
			<groupId>org.apache.flink</groupId>
54
			<artifactId>flink-scala_${scala.binary.version}</artifactId>
55 56 57 58
			<version>${project.version}</version>
		</dependency>

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

64 65
		<dependency>
			<groupId>org.apache.flink</groupId>
66
			<artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
67 68 69
			<version>${project.version}</version>
		</dependency>

70
		<dependency>
71
			<groupId>org.apache.flink</groupId>
72
			<artifactId>flink-optimizer_${scala.binary.version}</artifactId>
73 74 75 76
			<version>${project.version}</version>
		</dependency>

		<dependency>
77
			<groupId>org.apache.flink</groupId>
78
			<artifactId>flink-clients_${scala.binary.version}</artifactId>
79 80 81
			<version>${project.version}</version>
		</dependency>

82 83
		<dependency>
			<groupId>org.apache.flink</groupId>
84
			<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
85 86 87 88 89
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
90
			<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
91 92
			<version>${project.version}</version>
		</dependency>
93

94 95 96 97 98 99
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-core</artifactId>
			<version>${project.version}</version>
		</dependency>

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

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-container_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
116 117 118 119
		</dependency>

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

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

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

142 143 144 145 146 147 148 149
		<!-- 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>
150

151 152 153 154 155 156
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-mapr-fs</artifactId>
			<version>${project.version}</version>
		</dependency>

157
		<!-- Concrete logging framework - we add this only here (and not in the 
158
			root POM) to not tie the projects to one specific framework and make
159
			it easier for users to swap logging frameworks -->
160 161 162 163 164 165 166 167 168 169 170 171

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<scope>compile</scope>
		</dependency>
172

173 174 175 176 177 178
		<!--
			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.
		-->

179 180 181 182 183 184 185 186 187 188 189 190 191 192
		<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>

193 194
		<dependency>
			<groupId>org.apache.flink</groupId>
195 196 197 198 199 200 201 202 203 204 205 206 207 208
			<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>
209
			<artifactId>flink-gelly-examples_${scala.binary.version}</artifactId>
210 211 212 213
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

214 215 216 217 218 219 220
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-examples-table_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

221 222 223 224 225
		<!--
			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.
		-->
226 227 228 229 230 231

		<!-- start optional Flink metrics reporters -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-dropwizard</artifactId>
			<version>${project.version}</version>
232
			<scope>provided</scope>
233 234 235 236 237 238
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-graphite</artifactId>
			<version>${project.version}</version>
239
			<scope>provided</scope>
240 241
		</dependency>

A
ap 已提交
242 243 244 245 246 247 248
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-influxdb_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

249 250
		<dependency>
			<groupId>org.apache.flink</groupId>
251
			<artifactId>flink-metrics-prometheus_${scala.binary.version}</artifactId>
252 253 254 255
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

256 257 258 259
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-statsd</artifactId>
			<version>${project.version}</version>
260
			<scope>provided</scope>
261
		</dependency>
262 263 264 265 266 267 268

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-datadog</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
269 270 271 272 273 274 275

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

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

280 281
		<dependency>
			<groupId>org.apache.flink</groupId>
282
			<artifactId>flink-cep_${scala.binary.version}</artifactId>
283
			<version>${project.version}</version>
284
			<scope>provided</scope>
285 286 287 288
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
289
			<artifactId>flink-cep-scala_${scala.binary.version}</artifactId>
290
			<version>${project.version}</version>
291
			<scope>provided</scope>
292 293 294 295
		</dependency>

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

		<dependency>
			<groupId>org.apache.flink</groupId>
303
			<artifactId>flink-gelly-scala_${scala.binary.version}</artifactId>
304
			<version>${project.version}</version>
305
			<scope>provided</scope>
306 307
		</dependency>

308 309
		<dependency>
			<groupId>org.apache.flink</groupId>
310
			<artifactId>flink-table-uber_${scala.binary.version}</artifactId>
311
			<version>${project.version}</version>
312
			<scope>provided</scope>
313
		</dependency>
314

315 316 317 318 319 320 321
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-table-uber-blink_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

322 323
		<dependency>
			<groupId>org.apache.flink</groupId>
324
			<artifactId>flink-sql-client_${scala.binary.version}</artifactId>
325 326 327 328
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

329 330 331 332 333 334 335
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-state-processor-api_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

336 337 338 339 340 341 342
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-azure-fs-hadoop</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

343 344 345 346 347 348 349 350 351 352 353
		<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>
354 355 356 357 358 359 360
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-swift-fs-hadoop</artifactId>
			<version>${project.version}</version>
361 362 363
			<scope>provided</scope>
		</dependency>

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

371 372 373 374 375 376
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-queryable-state-runtime_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
377 378 379

		<dependency>
			<groupId>org.apache.flink</groupId>
380
			<artifactId>flink-python_${scala.binary.version}</artifactId>
381 382 383
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
384 385 386 387 388 389

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-shaded-netty-tcnative-dynamic</artifactId>
			<scope>provided</scope>
		</dependency>
390
		<!-- end optional Flink libraries -->
391

392 393 394 395 396 397 398 399 400
		<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>

401 402 403 404 405 406 407 408 409 410
		<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>

411 412 413 414 415 416 417
		<!-- test dependencies -->

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

420
	<profiles>
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438
		<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>

439 440 441 442 443
		<profile>
			<!-- Copies that shaded Hadoop uber jar to the dist folder. -->
			<id>include-hadoop</id>
			<activation>
				<property>
444
					<name>include-hadoop</name>
445 446
				</property>
			</activation>
447 448 449 450 451 452 453
			<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>
454 455
					<artifactId>flink-shaded-hadoop-2-uber</artifactId>
					<version>${hadoop.version}-${flink.shaded.version}</version>
456 457 458
					<scope>provided</scope>
				</dependency>
			</dependencies>
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483
			<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>
484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521
		<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>
522
										<argument>-sfn</argument>
523 524 525 526 527 528 529 530 531 532 533
										<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>

534
	</profiles>
535

S
sewen 已提交
536 537
	<build>
		<plugins>
538 539 540 541 542 543 544 545 546 547 548 549 550 551 552
			<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>
553

554 555 556 557 558 559 560 561 562 563 564 565 566 567
			<!--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>

568 569 570 571 572 573 574 575 576 577
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
578 579 580 581 582 583 584 585
				<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>
586 587 588 589 590 591 592
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
593
						<id>copy-javax-jars</id>
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608
						<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>
609 610 611 612 613 614 615
						<artifactItem>
							<groupId>javax.activation</groupId>
							<artifactId>javax.activation-api</artifactId>
							<version>${javax.activation.api.version}</version>
							<type>jar</type>
							<overWrite>true</overWrite>
						</artifactItem>
616 617 618 619 620 621 622 623 624 625
					</artifactItems>
					<outputDirectory>${project.build.directory}/temporary</outputDirectory>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
626
						<id>unpack-javax-libraries</id>
627 628 629 630 631 632
						<phase>process-resources</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
633 634 635 636 637 638
								<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>
639 640 641 642 643 644
							</target>
						</configuration>
					</execution>
				</executions>
			</plugin>

645
			<!-- Build uber jar -->
646 647 648 649 650 651 652 653 654 655 656 657 658
			<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>
659 660 661 662 663 664 665
							<filters>
								<!-- Globally exclude log4j.properties from our JAR files. -->
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>log4j.properties</exclude>
										<exclude>log4j-test.properties</exclude>
666 667 668
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
669
										<exclude>org/apache/flink/runtime/util/BashJavaUtils.class</exclude>
670 671 672
									</excludes>
								</filter>
							</filters>
673 674
							<artifactSet>
								<excludes>
675 676
									<exclude>org.slf4j:slf4j-log4j12</exclude>
									<exclude>log4j:log4j</exclude>
677 678 679 680 681 682 683 684
								</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"/>
685 686
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
									<projectName>Apache Flink</projectName>
687
									<encoding>UTF-8</encoding>
688
								</transformer>
689 690 691
							</transformers>
						</configuration>
					</execution>
692 693 694 695 696 697 698 699 700
					<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>
701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754
					<!-- 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>
									<include>org.slf4j:slf4j-log4j12</include>
									<include>log4j:log4j</include>
									<include>org.apache.flink:*</include>
								</includes>
							</artifactSet>
							<transformers>
								<!-- Include a log4j configuration that always prints to stdout -->
								<transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
									<resource>log4j.properties</resource>
									<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>
755 756 757
				</executions>
			</plugin>

S
sewen 已提交
758 759 760 761
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
762
						<id>bin</id>
S
sewen 已提交
763 764 765 766
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
767 768 769 770
						<configuration>
							<descriptors>
								<descriptor>src/main/assemblies/bin.xml</descriptor>
							</descriptors>
771 772
							<finalName>flink-${project.version}-bin</finalName>
							<appendAssemblyId>false</appendAssemblyId>
773
						</configuration>
S
sewen 已提交
774
					</execution>
775 776 777 778 779 780 781 782 783 784 785 786 787 788
					<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 已提交
789 790
				</executions>
			</plugin>
791

792 793 794
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
795
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
796 797 798 799
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
800

801 802 803 804 805 806 807 808 809 810 811 812 813 814
			<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>
815
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
816
					<skipPoms>false</skipPoms>
817
					<generateGitPropertiesFilename>src/main/flink-bin/.version.properties</generateGitPropertiesFilename>
818 819 820 821
					<gitDescribe>
						<!-- don't generate the describe property -->
						<skip>true</skip>
					</gitDescribe>
822 823
				</configuration>
			</plugin>
S
sewen 已提交
824 825
		</plugins>
	</build>
826

S
sewen 已提交
827
</project>