pom.xml 18.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>
T
Till Rohrmann 已提交
28
		<version>1.8-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 100
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-streaming-python_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

101 102 103 104 105 106
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-core</artifactId>
			<version>${project.version}</version>
		</dependency>

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

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

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

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

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

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

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

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

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

174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
		<!--
			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>
			<artifactId>flink-shaded-hadoop2-uber</artifactId>
			<version>${project.version}</version>
			<!--
				Exclusion of flink-shaded-hadoop2 not necessary, dependencies
				are shaded away properly by flink-shaded-hadoop2-uber.
			-->
			<scope>provided</scope>
		</dependency>

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
			<artifactId>flink-gelly-examples_${scala.binary.version}</artifactId>
213 214 215 216
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

217 218 219 220 221
		<!--
			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.
		-->
222 223 224 225 226 227

		<!-- start optional Flink metrics reporters -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-dropwizard</artifactId>
			<version>${project.version}</version>
228
			<scope>provided</scope>
229 230 231 232 233 234
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-ganglia</artifactId>
			<version>${project.version}</version>
235
			<scope>provided</scope>
236 237 238 239 240 241
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-graphite</artifactId>
			<version>${project.version}</version>
242
			<scope>provided</scope>
243 244
		</dependency>

245 246 247 248 249 250 251
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-prometheus</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

252 253 254 255
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-statsd</artifactId>
			<version>${project.version}</version>
256
			<scope>provided</scope>
257
		</dependency>
258 259 260 261 262 263 264

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

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

		<!-- start optional Flink libraries -->
275 276 277 278 279 280 281 282

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

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

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

		<dependency>
			<groupId>org.apache.flink</groupId>
299
			<artifactId>flink-gelly_${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-gelly-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-ml_${scala.binary.version}</artifactId>
314
			<version>${project.version}</version>
315 316 317 318 319
			<scope>provided</scope>
		</dependency>

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

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

332 333 334 335 336 337 338 339 340 341 342
		<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>
343 344 345 346 347 348 349
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-swift-fs-hadoop</artifactId>
			<version>${project.version}</version>
350 351 352
			<scope>provided</scope>
		</dependency>

353 354 355 356 357 358
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-queryable-state-runtime_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
359
		<!-- end optional Flink libraries -->
360 361 362 363 364 365 366 367

		<!-- test dependencies -->

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

370
	<profiles>
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
		<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>

389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421
		<profile>
			<!-- Copies that shaded Hadoop uber jar to the dist folder. -->
			<id>include-hadoop</id>
			<activation>
				<property>
					<name>!withoutHadoop</name>
				</property>
			</activation>
			<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>
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459
		<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>
460
										<argument>-sfn</argument>
461 462 463 464 465 466 467 468 469 470 471
										<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>

472
	</profiles>
473

S
sewen 已提交
474 475
	<build>
		<plugins>
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490
			<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>
491

492 493 494 495 496 497 498 499 500 501 502 503 504 505
			<!--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>

506
			<!--Build uber jar-->
507 508 509 510 511 512 513 514 515 516 517 518 519
			<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>
520 521 522 523 524 525 526
							<filters>
								<!-- Globally exclude log4j.properties from our JAR files. -->
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>log4j.properties</exclude>
										<exclude>log4j-test.properties</exclude>
527 528 529
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
530 531 532
									</excludes>
								</filter>
							</filters>
533 534
							<artifactSet>
								<excludes>
535 536
									<exclude>org.slf4j:slf4j-log4j12</exclude>
									<exclude>log4j:log4j</exclude>
537 538 539 540 541 542 543 544
								</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"/>
545
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
546 547 548
							</transformers>
						</configuration>
					</execution>
549 550 551 552 553 554 555 556 557
					<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>
558 559 560
				</executions>
			</plugin>

S
sewen 已提交
561 562 563 564
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
565
						<id>bin</id>
S
sewen 已提交
566 567 568 569
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
570 571 572 573
						<configuration>
							<descriptors>
								<descriptor>src/main/assemblies/bin.xml</descriptor>
							</descriptors>
574 575
							<finalName>flink-${project.version}-bin</finalName>
							<appendAssemblyId>false</appendAssemblyId>
576
						</configuration>
S
sewen 已提交
577
					</execution>
578 579 580 581 582 583 584 585 586 587 588 589 590 591
					<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 已提交
592 593
				</executions>
			</plugin>
594

595 596 597
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
598
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
599 600 601 602
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
603

604 605 606 607 608 609 610 611 612 613 614 615 616 617
			<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>
618
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
619
					<skipPoms>false</skipPoms>
620
					<generateGitPropertiesFilename>src/main/flink-bin/.version.properties</generateGitPropertiesFilename>
621 622 623 624
					<gitDescribe>
						<!-- don't generate the describe property -->
						<skip>true</skip>
					</gitDescribe>
625 626
				</configuration>
			</plugin>
S
sewen 已提交
627 628
		</plugins>
	</build>
629

S
sewen 已提交
630
</project>