pom.xml 15.9 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 209 210
		<!-- Concrete logging framework - we add this only here (and not in the 
			root POM to not tie the projects to one specific framework and make
			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
		<!--
			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>
232
			<artifactId>flink-gelly-examples_${scala.binary.version}</artifactId>
233 234 235 236
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>

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

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

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-ganglia</artifactId>
			<version>${project.version}</version>
255
			<scope>provided</scope>
256 257 258 259 260 261
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-graphite</artifactId>
			<version>${project.version}</version>
262
			<scope>provided</scope>
263 264
		</dependency>

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

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

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-metrics-datadog</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
285 286 287 288 289
		<!-- end optional Flink metrics reporters -->

		<!-- start optional Flink libraries -->
		<dependency>
			<groupId>org.apache.flink</groupId>
290
			<artifactId>flink-cep_${scala.binary.version}</artifactId>
291
			<version>${project.version}</version>
292
			<scope>provided</scope>
293 294 295 296
		</dependency>

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

		<dependency>
			<groupId>org.apache.flink</groupId>
304
			<artifactId>flink-gelly_${scala.binary.version}</artifactId>
305
			<version>${project.version}</version>
306
			<scope>provided</scope>
307 308 309 310
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
311
			<artifactId>flink-gelly-scala_${scala.binary.version}</artifactId>
312
			<version>${project.version}</version>
313
			<scope>provided</scope>
314 315 316 317
		</dependency>

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

		<dependency>
			<groupId>org.apache.flink</groupId>
325
			<artifactId>flink-table_${scala.binary.version}</artifactId>
326
			<version>${project.version}</version>
327
			<scope>provided</scope>
328
		</dependency>
329
		
330
		<!-- end optional Flink libraries -->
331 332 333 334 335 336 337 338 339 340

		<!-- 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 已提交
341 342
	</dependencies>

343
	<profiles>
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381
		<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>
382
										<argument>-sfn</argument>
383 384 385 386 387 388 389 390 391 392 393
										<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>

394
	</profiles>
395

S
sewen 已提交
396 397
	<build>
		<plugins>
398

399 400 401 402 403 404 405 406 407 408 409 410 411 412
			<!--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>

413
			<!--Build uber jar-->
414 415 416 417 418 419 420 421 422 423 424 425 426
			<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>
427 428 429 430 431 432 433
							<filters>
								<!-- Globally exclude log4j.properties from our JAR files. -->
								<filter>
									<artifact>*</artifact>
									<excludes>
										<exclude>log4j.properties</exclude>
										<exclude>log4j-test.properties</exclude>
434 435 436
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
437 438 439
									</excludes>
								</filter>
							</filters>
440 441
							<artifactSet>
								<excludes>
442 443
									<exclude>org.apache.flink:flink-examples-batch</exclude>
									<exclude>org.apache.flink:flink-examples-streaming</exclude>
444
									<exclude>org.apache.flink:flink-examples-table</exclude>
445
									<exclude>org.apache.flink:flink-python</exclude>
446 447
									<exclude>org.slf4j:slf4j-log4j12</exclude>
									<exclude>log4j:log4j</exclude>
448 449 450 451 452 453 454 455
								</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"/>
456
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
457 458 459
							</transformers>
						</configuration>
					</execution>
460 461 462 463 464 465 466 467 468
					<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>
469 470 471
				</executions>
			</plugin>

S
sewen 已提交
472 473 474 475
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<executions>
					<execution>
476
						<id>bin</id>
S
sewen 已提交
477 478 479 480
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
481 482 483 484
						<configuration>
							<descriptors>
								<descriptor>src/main/assemblies/bin.xml</descriptor>
							</descriptors>
485 486
							<finalName>flink-${project.version}-bin</finalName>
							<appendAssemblyId>false</appendAssemblyId>
487
						</configuration>
S
sewen 已提交
488
					</execution>
489 490 491 492 493 494 495 496 497 498 499 500 501 502
					<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 已提交
503 504
				</executions>
			</plugin>
505

506 507 508
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
509
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
510 511 512 513
				<configuration>
					<skip>true</skip>
				</configuration>
			</plugin>
514

515 516 517 518 519 520 521 522 523 524 525 526 527 528 529
			<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>
530
					<failOnNoGitDirectory>false</failOnNoGitDirectory>
531
					<skipPoms>false</skipPoms>
532
					<generateGitPropertiesFilename>src/main/flink-bin/.version.properties</generateGitPropertiesFilename>
533 534 535 536
					<gitDescribe>
						<!-- don't generate the describe property -->
						<skip>true</skip>
					</gitDescribe>
537 538
				</configuration>
			</plugin>
S
sewen 已提交
539 540
		</plugins>
	</build>
541

S
sewen 已提交
542
</project>