pom.xml 5.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
<!--
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

  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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	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>
		<groupId>org.apache.flink</groupId>
		<artifactId>flink-parent</artifactId>
M
mbalassi 已提交
26
		<version>0.10-SNAPSHOT</version>
27 28 29 30
		<relativePath>..</relativePath>
	</parent>

	<!--
31
	There is a separate "flink-yarn-tests" package that expects the "flink-dist" package
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
	to be build before.
	We need the YARN fat jar build by flink-dist for the tests.
	-->
	
	<artifactId>flink-yarn-tests</artifactId>
	<name>flink-yarn-tests</name>
	<packaging>jar</packaging>

	<dependencies>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-runtime</artifactId>
			<version>${project.version}</version>
		</dependency>
		
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-clients</artifactId>
			<version>${project.version}</version>
		</dependency>

54 55 56 57 58 59 60
		<!-- Needed for the streaming wordcount example -->
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-streaming-core</artifactId>
			<version>${project.version}</version>
		</dependency>

61 62 63 64 65
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-yarn</artifactId>
			<version>${project.version}</version>
		</dependency>
66

67 68 69 70 71
		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-test-utils</artifactId>
			<version>${project.version}</version>
		</dependency>
72 73

		<dependency>
74 75 76
			<groupId>org.apache.flink</groupId>
			<artifactId>${shading-artifact.name}</artifactId>
			<version>${project.version}</version>
77 78 79
		</dependency>

		<dependency>
80 81 82 83 84 85 86 87 88
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-shaded-include-yarn-tests</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
					<groupId>asm</groupId>
					<artifactId>asm</artifactId>
				</exclusion>
			</exclusions>
89
		</dependency>
90
				
91
		<dependency>
92 93 94 95
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.11</version>
			<type>jar</type>
96 97
		</dependency>

98 99 100 101 102 103
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>

104 105 106
	</dependencies>

	<build>
107 108
		<testSourceDirectory>src/main/java</testSourceDirectory>

109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
		<plugins>
			<!-- Set the root directory for all tests to the project root.
			We need this to be able to locate the final build (in flink-dist)
			-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<configuration>
					<!-- Enforce single threaded execution due to port conflicts with the mini yarn cluster -->
					<forkCount>1</forkCount>
					<workingDirectory>../</workingDirectory>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<workingDirectory>../</workingDirectory>
				</configuration>
			</plugin>
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
      
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<executions>
					<execution>
						<id>shade-hadoop</id>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<shadedArtifactAttached>false</shadedArtifactAttached>
							<createDependencyReducedPom>true</createDependencyReducedPom>
							<dependencyReducedPomLocation>${project.basedir}/target/dependency-reduced-pom.xml</dependencyReducedPomLocation>
							<filters>
								<filter>
									<artifact>org.slf4j:*</artifact>
									<excludes>
										<exclude>org/slf4j/impl/StaticLoggerBinder*</exclude>
									</excludes>
								</filter>
							</filters>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
							</transformers>
							<relocations>
								<relocation>
									<pattern>com.google</pattern>
									<shadedPattern>org.apache.flink.hadoop.shaded.com.google</shadedPattern>
									<excludes>
										<exclude>com.google.inject.**</exclude>
									</excludes>
								</relocation>
								<relocation>
									<pattern>org.objectweb.asm</pattern>
									<shadedPattern>org.apache.flink.hadoop.shaded.org.objectweb.asm</shadedPattern>
								</relocation>
								<relocation>
									<pattern>org.jboss.netty</pattern>
									<shadedPattern>org.apache.flink.hadoop.shaded.org.jboss.netty</shadedPattern>
								</relocation>
							</relocations>
172 173 174
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
							</transformers>
175 176 177 178 179
						</configuration>
					</execution>
				</executions>
			</plugin>

180 181 182
		</plugins>
	</build>
</project>