pom.xml 18.8 KB
Newer Older
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 12 13 14 15 16 17 18
  http://www.apache.org/licenses/LICENSE-2.0

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

-->
21
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22 23 24 25 26
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<parent>
27 28
		<groupId>org.apache.flink</groupId>
		<artifactId>flink-parent</artifactId>
P
Piotr Nowojski 已提交
29
		<version>1.12-SNAPSHOT</version>
30 31 32
		<relativePath>..</relativePath>
	</parent>

33
	<artifactId>flink-tests</artifactId>
34
	<name>flink-tests</name>
35 36 37 38

	<packaging>jar</packaging>

	<dependencies>
39
	
40
		<dependency>
41 42
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
43
			<version>${project.version}</version>
44
			<scope>test</scope>
45
		</dependency>
46 47 48 49 50 51 52 53 54

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-core</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>

55 56
		<dependency>
			<groupId>org.apache.flink</groupId>
57 58 59 60
			<artifactId>flink-shaded-guava</artifactId>
			<scope>test</scope>
		</dependency>

61 62 63 64 65
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-shaded-jackson</artifactId>
			<scope>test</scope>
		</dependency>
66 67 68 69 70 71
		
		<dependency>
			<groupId>org.apache.hadoop</groupId>
			<artifactId>hadoop-common</artifactId>
			<scope>test</scope>
		</dependency>
72

73 74 75 76 77 78 79 80
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-streaming-java_${scala.binary.version}</artifactId>
			<version>${project.version}</version>
			<scope>test</scope>
			<type>test-jar</type>
		</dependency>

81
		<dependency>
82
			<groupId>org.apache.flink</groupId>
83
			<artifactId>flink-optimizer_${scala.binary.version}</artifactId>
84
			<version>${project.version}</version>
85
			<scope>test</scope>
86
		</dependency>
87
		
88
		<dependency>
89
			<groupId>org.apache.flink</groupId>
90
			<artifactId>flink-runtime_${scala.binary.version}</artifactId>
91
			<version>${project.version}</version>
92
			<scope>test</scope>
93
		</dependency>
94 95 96

		<dependency>
			<groupId>org.apache.flink</groupId>
97
			<artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
98 99 100 101
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>

102 103
		<dependency>
			<groupId>org.apache.flink</groupId>
104
			<artifactId>flink-runtime-web_${scala.binary.version}</artifactId>
105 106
			<version>${project.version}</version>
			<scope>test</scope>
107
			<type>test-jar</type>
108 109
		</dependency>

110
		<dependency>
111
			<groupId>org.apache.flink</groupId>
112
			<artifactId>flink-clients_${scala.binary.version}</artifactId>
113
			<version>${project.version}</version>
114
			<scope>test</scope>
115
		</dependency>
116
		
117
		<dependency>
118 119
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
120
			<version>${project.version}</version>
121
			<scope>test</scope>
122
		</dependency>
123 124 125

		<dependency>
			<groupId>org.apache.flink</groupId>
126
			<artifactId>flink-scala_${scala.binary.version}</artifactId>
127 128 129 130
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>

131
		<dependency>
132
			<groupId>org.apache.flink</groupId>
133
			<artifactId>flink-scala_${scala.binary.version}</artifactId>
134
			<version>${project.version}</version>
135
			<type>test-jar</type>
136 137
			<scope>test</scope>
		</dependency>
138

139 140 141 142 143
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-test-utils-junit</artifactId>
		</dependency>

144
		<dependency>
145
			<groupId>org.apache.flink</groupId>
146
			<artifactId>flink-test-utils_${scala.binary.version}</artifactId>
147 148 149
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
150
		
151
		<dependency>
152
			<groupId>org.apache.flink</groupId>
153
			<artifactId>flink-examples-batch_${scala.binary.version}</artifactId>
154 155 156
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
157 158 159 160 161 162 163 164

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
			<version>${project.version}</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>
165

166 167
		<dependency>
			<groupId>org.apache.flink</groupId>
168
			<artifactId>flink-hadoop-compatibility_${scala.binary.version}</artifactId>
169 170 171 172
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>

173 174
		<dependency>
			<groupId>org.apache.flink</groupId>
175
			<artifactId>flink-hadoop-compatibility_${scala.binary.version}</artifactId>
176 177 178 179 180
			<version>${project.version}</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>

181 182
		<dependency>
			<groupId>org.apache.flink</groupId>
183
			<artifactId>flink-optimizer_${scala.binary.version}</artifactId>
184 185 186 187 188
			<version>${project.version}</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>

189 190
		<dependency>
			<groupId>org.apache.flink</groupId>
191
			<artifactId>flink-runtime_${scala.binary.version}</artifactId>
192 193 194 195 196
			<version>${project.version}</version>
			<type>test-jar</type>
			<scope>test</scope>
		</dependency>

197
		<dependency>
198 199 200
			<groupId>org.apache.curator</groupId>
			<artifactId>curator-test</artifactId>
			<version>${curator.version}</version>
201 202 203
			<scope>test</scope>
		</dependency>

204 205 206 207 208
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-shaded-guava</artifactId>
		</dependency>

209 210
		<dependency>
			<groupId>org.scalatest</groupId>
211
			<artifactId>scalatest_${scala.binary.version}</artifactId>
212
			<scope>test</scope>
213
		</dependency>
214 215 216 217 218 219
		
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<scope>test</scope>
		</dependency>
220

221 222 223 224 225 226
		<dependency>
			<groupId>org.joda</groupId>
			<artifactId>joda-convert</artifactId>
			<scope>test</scope>
		</dependency>

227 228
		<dependency>
			<groupId>org.apache.flink</groupId>
229
			<artifactId>flink-statebackend-rocksdb_${scala.binary.version}</artifactId>
230 231 232
			<version>${project.version}</version>
			<scope>test</scope>
		</dependency>
233

234 235 236 237 238 239
		<dependency>
			<groupId>com.github.oshi</groupId>
			<artifactId>oshi-core</artifactId>
			<scope>test</scope>
		</dependency>

240 241 242 243 244 245
		<!-- utility to scan classpaths -->
		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
		</dependency>

246 247 248
	</dependencies>

	<build>
249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
		<plugins>
			<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>

266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
			<!-- Scala Compiler -->
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>scala-maven-plugin</artifactId>
				<executions>
					<!-- Run scala compiler in the process-resources phase, so that dependencies on
						scala classes can be resolved later in the (Java) compile phase -->
					<execution>
						<id>scala-compile-first</id>
						<phase>process-resources</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
 
					<!-- Run scala compiler in the process-test-resources phase, so that dependencies on
						 scala classes can be resolved later in the (Java) test-compile phase -->
					<execution>
						<id>scala-test-compile</id>
						<phase>process-test-resources</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<jvmArgs>
						<jvmArg>-Xms128m</jvmArg>
						<jvmArg>-Xmx512m</jvmArg>
					</jvmArgs>
				</configuration>
			</plugin>
			
			<!-- Eclipse Integration -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-eclipse-plugin</artifactId>
				<version>2.8</version>
				<configuration>
					<downloadSources>true</downloadSources>
					<projectnatures>
						<projectnature>org.scala-ide.sdt.core.scalanature</projectnature>
						<projectnature>org.eclipse.jdt.core.javanature</projectnature>
					</projectnatures>
					<buildcommands>
						<buildcommand>org.scala-ide.sdt.core.scalabuilder</buildcommand>
					</buildcommands>
					<classpathContainers>
						<classpathContainer>org.scala-ide.sdt.launching.SCALA_CONTAINER</classpathContainer>
						<classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER</classpathContainer>
					</classpathContainers>
					<excludes>
						<exclude>org.scala-lang:scala-library</exclude>
						<exclude>org.scala-lang:scala-compiler</exclude>
					</excludes>
					<sourceIncludes>
						<sourceInclude>**/*.scala</sourceInclude>
						<sourceInclude>**/*.java</sourceInclude>
					</sourceIncludes>
				</configuration>
			</plugin>

			<!-- Adding scala source directories to build path -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<executions>
					<!-- Add src/main/scala to eclipse build path -->
					<execution>
						<id>add-source</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/main/scala</source>
							</sources>
						</configuration>
					</execution>
					<!-- Add src/test/scala to eclipse build path -->
					<execution>
						<id>add-test-source</id>
						<phase>generate-test-sources</phase>
						<goals>
							<goal>add-test-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>src/test/scala</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
361 362

			<!-- Scala Code Style, most of the configuration done via plugin management -->
363 364 365 366 367 368 369 370
			<plugin>
				<groupId>org.scalastyle</groupId>
				<artifactId>scalastyle-maven-plugin</artifactId>
				<configuration>
					<configLocation>${project.basedir}/../tools/maven/scalastyle-config.xml</configLocation>
				</configuration>
			</plugin>
		
371 372 373 374 375 376 377 378 379 380 381
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
382
			
383 384 385 386 387 388 389 390 391 392
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<systemPropertyVariables>
						<log.level>WARN</log.level>
					</systemPropertyVariables>
					<excludes>
						<exclude>**/*TestBase*.class</exclude>
					</excludes>
393 394 395 396 397
					<classpathDependencyExcludes>
						<classpathDependencyExclude>org.apache.curator:curator-recipes</classpathDependencyExclude>
						<classpathDependencyExclude>org.apache.curator:curator-client</classpathDependencyExclude>
						<classpathDependencyExclude>org.apache.curator:curator-framework</classpathDependencyExclude>
					</classpathDependencyExcludes>
398 399 400
					<!-- We override the fork behaviour for those expensive tests to avoid process
					kills due to container limits on travis -->
					<forkCount>${flink.forkCountTestPackage}</forkCount>
401
					<reuseForks>false</reuseForks>
402 403 404 405 406
					<environmentVariables>
						<!-- Make sure external hadoop environment will not affect maven building -->
						<HADOOP_HOME />
						<HADOOP_CONF_DIR />
					</environmentVariables>
407 408
				</configuration>
			</plugin>
409

410 411
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
412
				<version>2.4</version><!--$NO-MVN-MAN-VER$-->
413
				<executions>
414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444

					<execution>
						<id>create-plugin-a-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<finalName>plugin-a</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-plugin-a-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>

					<execution>
						<id>create-plugin-b-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<finalName>plugin-b</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-plugin-b-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>

445
					<execution>
446
						<id>create-kmeans-jar</id>
447 448 449 450 451 452 453
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
454
									<mainClass>org.apache.flink.test.classloading.jar.KMeansForTest</mainClass>
455 456
								</manifest>
							</archive>
457
							<finalName>kmeans</finalName>
458 459
							<attach>false</attach>
							<descriptors>
460 461 462 463
								<descriptor>src/test/assembly/test-kmeans-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482
					<execution>
						<id>create-usercodetype-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.UserCodeType</mainClass>
								</manifest>
							</archive>
							<finalName>usercodetype</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-usercodetype-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
483 484 485 486 487 488 489 490 491
					<execution>
						<id>create-custominputsplit-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
492
									<mainClass>org.apache.flink.test.classloading.jar.CustomInputSplitProgram</mainClass>
493 494 495 496 497 498
								</manifest>
							</archive>
							<finalName>customsplit</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-custominput-assembly.xml</descriptor>
499 500 501
							</descriptors>
						</configuration>
					</execution>
502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520
					<execution>
						<id>create-streaming-custominputsplit-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.StreamingCustomInputSplitProgram</mainClass>
								</manifest>
							</archive>
							<finalName>streaming-customsplit</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-streaming-custominput-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539
					<execution>
						<id>create-streamingclassloader-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.StreamingProgram</mainClass>
								</manifest>
							</archive>
							<finalName>streamingclassloader</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-streamingclassloader-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558
					<execution>
						<id>create-streaming-state-checkpointed-classloader-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.CheckpointedStreamingProgram</mainClass>
								</manifest>
							</archive>
							<finalName>streaming-checkpointed-classloader</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-streaming-state-checkpointed-classloader-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577
					<execution>
						<id>create-custom_kv_state-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.CustomKvStateProgram</mainClass>
								</manifest>
							</archive>
							<finalName>custom_kv_state</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-custom_kv_state-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596
					<execution>
						<id>create-checkpointing_custom_kv_state-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.CheckpointingCustomKvStateProgram</mainClass>
								</manifest>
							</archive>
							<finalName>checkpointing_custom_kv_state</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-checkpointing-custom_kv_state-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615
					<execution>
						<id>create-classloading_policy-jar</id>
						<phase>process-test-classes</phase>
						<goals>
							<goal>single</goal>
						</goals>
						<configuration>
							<archive>
								<manifest>
									<mainClass>org.apache.flink.test.classloading.jar.ClassLoadingPolicyProgram</mainClass>
								</manifest>
							</archive>
							<finalName>classloading_policy</finalName>
							<attach>false</attach>
							<descriptors>
								<descriptor>src/test/assembly/test-classloading_policy-assembly.xml</descriptor>
							</descriptors>
						</configuration>
					</execution>
616 617
				</executions>
			</plugin>
618 619 620 621 622 623

			<!--Remove the KMeansForTest code from the test-classes directory since it musn't be in the
			classpath when running the tests to actually test whether the user code class loader
			is properly used.-->
			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
624
				<version>2.5</version><!--$NO-MVN-MAN-VER$-->
625
				<executions>
626
					<execution>
627
						<id>remove-classloading-test-dependencies</id>
628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643
						<phase>process-test-classes</phase>
						<goals>
							<goal>clean</goal>
						</goals>
						<configuration>
							<excludeDefaultDirectories>true</excludeDefaultDirectories>
							<filesets>
								<fileset>
									<directory>${project.build.testOutputDirectory}</directory>
									<includes>
										<include>**/classloading/jar/*.class</include>
									</includes>
								</fileset>
							</filesets>
						</configuration>
					</execution>
644 645
				</executions>
			</plugin>
646 647 648
		</plugins>
	</build>
</project>