pom.xml 17.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>
28
		<version>1.4-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
			<version>${project.version}</version>
50 51 52 53 54 55
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
56
		</dependency>
57 58

		<dependency>
59
			<groupId>org.apache.flink</groupId>
60
			<artifactId>flink-scala_${scala.binary.version}</artifactId>
61
			<version>${project.version}</version>
62 63 64 65 66 67
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
68 69 70
		</dependency>

		<dependency>
71
			<groupId>org.apache.flink</groupId>
72
			<artifactId>flink-runtime_${scala.binary.version}</artifactId>
73
			<version>${project.version}</version>
74 75 76 77 78 79
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
80 81
		</dependency>

82 83
		<dependency>
			<groupId>org.apache.flink</groupId>
84
			<artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
85
			<version>${project.version}</version>
86 87 88 89 90 91
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
92 93
		</dependency>

94
		<dependency>
95
			<groupId>org.apache.flink</groupId>
96
			<artifactId>flink-optimizer_${scala.binary.version}</artifactId>
97
			<version>${project.version}</version>
98 99 100 101 102 103
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
104 105 106
		</dependency>

		<dependency>
107
			<groupId>org.apache.flink</groupId>
108
			<artifactId>flink-clients_${scala.binary.version}</artifactId>
109
			<version>${project.version}</version>
110 111 112 113 114 115
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
116 117
		</dependency>

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

124 125
		<dependency>
			<groupId>org.apache.flink</groupId>
126
			<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
127
			<version>${project.version}</version>
128 129 130 131 132 133
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
134 135 136 137
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
138
			<artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
139
			<version>${project.version}</version>
140 141 142 143 144 145
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
146
		</dependency>
147

Z
zentol 已提交
148 149
		<dependency>
			<groupId>org.apache.flink</groupId>
150
			<artifactId>flink-python_${scala.binary.version}</artifactId>
Z
zentol 已提交
151
			<version>${project.version}</version>
152 153 154 155 156 157
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
Z
zentol 已提交
158
		</dependency>
159

160 161
		<dependency>
			<groupId>org.apache.flink</groupId>
162
			<artifactId>flink-scala-shell_${scala.binary.version}</artifactId>
163
			<version>${project.version}</version>
164 165 166 167 168 169
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
170 171
		</dependency>

172 173 174 175 176 177
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-core</artifactId>
			<version>${project.version}</version>
		</dependency>

178 179 180 181 182
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-jmx</artifactId>
			<version>${project.version}</version>
		</dependency>
183 184 185
        
		<dependency>
			<groupId>org.apache.flink</groupId>
186
			<artifactId>flink-mesos_${scala.binary.version}</artifactId>
187 188 189 190 191
			<version>${project.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
192
			<artifactId>flink-statebackend-rocksdb_${scala.binary.version}</artifactId>
193 194
			<version>${project.version}</version>
		</dependency>
195 196 197

		<dependency>
			<groupId>org.apache.flink</groupId>
198
			<artifactId>flink-yarn_${scala.binary.version}</artifactId>
199
			<version>${project.version}</version>
200 201 202 203 204 205
			<exclusions>
				<exclusion>
					<groupId>org.apache.flink</groupId>
					<artifactId>flink-shaded-hadoop2</artifactId>
				</exclusion>
			</exclusions>
206
		</dependency>
207

208
		<!-- Concrete logging framework - we add this only here (and not in the 
209
			root POM) to not tie the projects to one specific framework and make
210
			it easier for users to swap logging frameworks -->
211 212 213 214 215 216 217 218 219 220 221 222

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

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

224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239
		<!--
			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>

240 241 242 243 244 245 246 247
		<!--
			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.
		-->

		<dependency>
			<groupId>org.apache.flink</groupId>
248
			<artifactId>flink-gelly-examples_${scala.binary.version}</artifactId>
249 250 251 252
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

253 254 255 256 257
		<!--
			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.
		-->
258 259 260 261 262 263

		<!-- start optional Flink metrics reporters -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-dropwizard</artifactId>
			<version>${project.version}</version>
264
			<scope>provided</scope>
265 266 267 268 269 270
		</dependency>

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

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-graphite</artifactId>
			<version>${project.version}</version>
278
			<scope>provided</scope>
279 280
		</dependency>

281 282 283 284 285 286 287
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-prometheus</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

288 289 290 291
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-statsd</artifactId>
			<version>${project.version}</version>
292
			<scope>provided</scope>
293
		</dependency>
294 295 296 297 298 299 300

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-datadog</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
301 302 303 304 305
		<!-- end optional Flink metrics reporters -->

		<!-- start optional Flink libraries -->
		<dependency>
			<groupId>org.apache.flink</groupId>
306
			<artifactId>flink-cep_${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-cep-scala_${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.binary.version}</artifactId>
321
			<version>${project.version}</version>
322
			<scope>provided</scope>
323 324 325 326
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
327
			<artifactId>flink-gelly-scala_${scala.binary.version}</artifactId>
328
			<version>${project.version}</version>
329
			<scope>provided</scope>
330 331 332 333
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
334
			<artifactId>flink-ml_${scala.binary.version}</artifactId>
335
			<version>${project.version}</version>
336 337 338 339 340
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
341
			<artifactId>flink-table_${scala.binary.version}</artifactId>
342
			<version>${project.version}</version>
343
			<scope>provided</scope>
344
		</dependency>
345
		
346
		<!-- end optional Flink libraries -->
347 348 349 350 351 352 353 354 355 356

		<!-- test dependencies -->

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-test-utils-junit</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- end test dependencies -->
S
sewen 已提交
357 358
	</dependencies>

359
	<profiles>
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
		<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>
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 422 423 424 425 426 427 428 429 430
		<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>
431
										<argument>-sfn</argument>
432 433 434 435 436 437 438 439 440 441 442
										<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>

443
	</profiles>
444

S
sewen 已提交
445 446
	<build>
		<plugins>
447

448 449 450 451 452 453 454 455 456 457 458 459 460 461
			<!--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>

462
			<!--Build uber jar-->
463 464 465 466 467 468 469 470 471 472 473 474 475
			<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>
476 477 478 479 480 481 482
							<filters>
								<!-- Globally exclude log4j.properties from our JAR files. -->
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>log4j.properties</exclude>
										<exclude>log4j-test.properties</exclude>
483 484 485
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
486 487 488
									</excludes>
								</filter>
							</filters>
489 490
							<artifactSet>
								<excludes>
491 492
									<exclude>org.apache.flink:flink-examples-batch</exclude>
									<exclude>org.apache.flink:flink-examples-streaming</exclude>
493
									<exclude>org.apache.flink:flink-examples-table</exclude>
494
									<exclude>org.apache.flink:flink-python</exclude>
495 496
									<exclude>org.slf4j:slf4j-log4j12</exclude>
									<exclude>log4j:log4j</exclude>
497 498 499 500 501 502 503 504
								</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"/>
505
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
506 507 508
							</transformers>
						</configuration>
					</execution>
509 510 511 512 513 514 515 516 517
					<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>
518 519 520
				</executions>
			</plugin>

S
sewen 已提交
521 522 523 524
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
525
						<id>bin</id>
S
sewen 已提交
526 527 528 529
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
530 531 532 533
						<configuration>
							<descriptors>
								<descriptor>src/main/assemblies/bin.xml</descriptor>
							</descriptors>
534 535
							<finalName>flink-${project.version}-bin</finalName>
							<appendAssemblyId>false</appendAssemblyId>
536
						</configuration>
S
sewen 已提交
537
					</execution>
538 539 540 541 542 543 544 545 546 547 548 549 550 551
					<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 已提交
552 553
				</executions>
			</plugin>
554

555 556 557
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
558
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
559 560 561 562
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
563

564 565 566 567 568 569 570 571 572 573 574 575 576 577 578
			<plugin>
				<!-- Description: https://github.com/ktoso/maven-git-commit-id-plugin -->
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>2.1.5</version>
				<executions>
					<execution>
						<goals>
							<goal>revision</goal>
						 </goals>
					</execution>
				</executions>
				<configuration>
					<dotGitDirectory>${project.basedir}/../.git</dotGitDirectory>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
579
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
580
					<skipPoms>false</skipPoms>
581
					<generateGitPropertiesFilename>src/main/flink-bin/.version.properties</generateGitPropertiesFilename>
582 583 584 585
					<gitDescribe>
						<!-- don't generate the describe property -->
						<skip>true</skip>
					</gitDescribe>
586 587
				</configuration>
			</plugin>
S
sewen 已提交
588 589
		</plugins>
	</build>
590

S
sewen 已提交
591
</project>