HBASE-20332 shaded mapreduce module shouldn't include hadoop
[hbase.git] / hbase-it / pom.xml
blob4c17245a9e63d860d14faa1a90e2878cc31aadc8
1 <?xml version="1.0"?>
2 <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/xsd/maven-4.0.0.xsd">
3 <!--
4 /**
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements.  See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership.  The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License.  You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 -->
22   <modelVersion>4.0.0</modelVersion>
23   <parent>
24     <artifactId>hbase-build-configuration</artifactId>
25     <groupId>org.apache.hbase</groupId>
26     <version>3.0.0-SNAPSHOT</version>
27     <relativePath>../hbase-build-configuration</relativePath>
28   </parent>
30   <artifactId>hbase-it</artifactId>
31   <name>Apache HBase - Integration Tests</name>
32   <description>Integration and System tests for HBase</description>
34   <properties>
35     <!-- Test inclusion patterns used by failsafe configuration -->
36     <unittest.include>**/Test*.java</unittest.include>
37     <integrationtest.include>**/IntegrationTest*.java</integrationtest.include>
38     <!-- To Run Tests with a particular Xmx Value use -Dfailsafe.Xmx=XXXg -->
39     <failsafe.Xmx>4g</failsafe.Xmx>
40     <!-- To run a single integration test, use -Dit.test=IntegrationTestXXX -->
41   </properties>
43   <build>
44     <testResources>
45       <testResource>
46          <!-- We depend on hbase-server test resources -->
47         <directory>../hbase-server/src/test/resources</directory>
48         <excludes>
49           <exclude>META-INF/NOTICE</exclude>
50           <exclude>META-INF/LICENSE</exclude>
51         </excludes>
52       </testResource>
53     </testResources>
54     <pluginManagement>
55       <plugins>
56         <!-- Make a jar and put the sources in the jar -->
57         <plugin>
58           <groupId>org.apache.maven.plugins</groupId>
59           <artifactId>maven-source-plugin</artifactId>
60         </plugin>
61       <plugin>
62         <!--Make it so assembly:single does nothing in here-->
63         <artifactId>maven-assembly-plugin</artifactId>
64         <configuration>
65           <skipAssembly>true</skipAssembly>
66         </configuration>
67       </plugin>
68         <plugin>
69           <groupId>org.apache.maven.plugins</groupId>
70           <artifactId>maven-failsafe-plugin</artifactId>
71           <version>${surefire.version}</version>
72           <dependencies>
73             <dependency>
74               <groupId>org.apache.maven.surefire</groupId>
75               <artifactId>surefire-junit4</artifactId>
76               <version>${surefire.version}</version>
77             </dependency>
78           </dependencies>
79           <configuration>
80             <includes>
81               <include>${integrationtest.include}</include>
82             </includes>
83             <excludes>
84               <exclude>${unittest.include}</exclude>
85               <exclude>**/*$*</exclude>
86             </excludes>
87             <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
88             <environmentVariables>
89               <LD_LIBRARY_PATH>${env.LD_LIBRARY_PATH}:${project.build.directory}/nativelib</LD_LIBRARY_PATH>
90               <DYLD_LIBRARY_PATH>${env.DYLD_LIBRARY_PATH}:${project.build.directory}/nativelib</DYLD_LIBRARY_PATH>
91               <MALLOC_ARENA_MAX>4</MALLOC_ARENA_MAX>
92             </environmentVariables>
93             <failIfNoTests>false</failIfNoTests>
94             <testFailureIgnore>false</testFailureIgnore>
95           </configuration>
96           <executions>
97             <execution>
98               <id>integration-test</id>
99               <phase>integration-test</phase>
100               <goals>
101                 <goal>integration-test</goal>
102               </goals>
103             </execution>
104             <execution>
105               <id>verify</id>
106               <phase>verify</phase>
107               <goals>
108                 <goal>verify</goal>
109               </goals>
110             </execution>
111           </executions>
112         </plugin>
113         <!--This plugin's configuration is used to store Eclipse m2e settings
114              only. It has no influence on the Maven build itself.-->
115         <plugin>
116           <groupId>org.eclipse.m2e</groupId>
117           <artifactId>lifecycle-mapping</artifactId>
118           <configuration>
119             <lifecycleMappingMetadata>
120               <pluginExecutions>
121                 <pluginExecution>
122                   <pluginExecutionFilter>
123                     <groupId>org.apache.maven.plugins</groupId>
124                     <artifactId>maven-dependency-plugin</artifactId>
125                     <versionRange>[2.8,)</versionRange>
126                     <goals>
127                       <goal>build-classpath</goal>
128                     </goals>
129                   </pluginExecutionFilter>
130                   <action>
131                     <ignore></ignore>
132                   </action>
133                 </pluginExecution>
134               </pluginExecutions>
135             </lifecycleMappingMetadata>
136           </configuration>
137         </plugin>
138       </plugins>
139     </pluginManagement>
141     <plugins>
142       <!--  Run integration tests with mvn verify -->
143       <plugin>
144         <groupId>org.apache.maven.plugins</groupId>
145         <artifactId>maven-failsafe-plugin</artifactId>
146           <configuration>
147             <skip>false</skip>
148             <forkMode>always</forkMode>
149             <!-- TODO: failsafe does timeout, but verify does not fail the build because of the timeout.
150                  I believe it is a failsafe bug, we may consider using surefire -->
151             <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
152             <argLine>-enableassertions -Xmx${failsafe.Xmx}
153                 -Djava.security.egd=file:/dev/./urandom -XX:+CMSClassUnloadingEnabled
154                 -verbose:gc -XX:+PrintCommandLineFlags  -XX:+PrintFlagsFinal</argLine>
155           </configuration>
156       </plugin>
157       <plugin>
158         <groupId>net.revelc.code</groupId>
159         <artifactId>warbucks-maven-plugin</artifactId>
160       </plugin>
161     </plugins>
162   </build>
164   <dependencies>
165         <!-- Intra-project dependencies -->
166     <dependency>
167       <groupId>org.apache.hbase</groupId>
168       <artifactId>hbase-annotations</artifactId>
169       <type>test-jar</type>
170       <scope>test</scope>
171     </dependency>
172     <dependency>
173       <groupId>org.apache.hbase</groupId>
174       <artifactId>hbase-common</artifactId>
175       <type>jar</type>
176     </dependency>
177     <dependency>
178       <groupId>org.apache.hbase</groupId>
179       <artifactId>hbase-protocol</artifactId>
180     </dependency>
181     <dependency>
182       <groupId>org.apache.hbase</groupId>
183       <artifactId>hbase-protocol-shaded</artifactId>
184     </dependency>
185     <dependency>
186       <groupId>org.apache.hbase</groupId>
187       <artifactId>hbase-client</artifactId>
188     </dependency>
189     <dependency>
190       <groupId>org.apache.hbase</groupId>
191       <artifactId>hbase-mapreduce</artifactId>
192     </dependency>
193     <dependency>
194       <groupId>org.apache.hbase</groupId>
195       <artifactId>hbase-mapreduce</artifactId>
196       <type>test-jar</type>
197       <scope>test</scope>
198     </dependency>
199     <dependency>
200       <groupId>org.apache.hbase</groupId>
201       <artifactId>hbase-rsgroup</artifactId>
202     </dependency>
203     <dependency>
204       <groupId>org.apache.hbase</groupId>
205       <artifactId>hbase-rsgroup</artifactId>
206       <type>test-jar</type>
207       <scope>test</scope>
208     </dependency>
209     <dependency>
210       <groupId>org.apache.hbase</groupId>
211       <artifactId>hbase-server</artifactId>
212     </dependency>
213     <dependency>
214       <groupId>org.apache.hbase</groupId>
215       <artifactId>${compat.module}</artifactId>
216       <version>${project.version}</version>
217     </dependency>
218     <dependency>
219       <groupId>org.apache.hbase</groupId>
220       <artifactId>hbase-testing-util</artifactId>
221     </dependency>
222     <dependency>
223       <groupId>org.apache.hbase</groupId>
224       <artifactId>hbase-backup</artifactId>
225       <version>${project.version}</version>
226     </dependency>
227     <dependency>
228       <groupId>org.apache.hbase.thirdparty</groupId>
229       <artifactId>hbase-shaded-miscellaneous</artifactId>
230     </dependency>
231     <dependency>
232       <groupId>io.dropwizard.metrics</groupId>
233       <artifactId>metrics-core</artifactId>
234     </dependency>
235     <dependency>
236       <groupId>org.slf4j</groupId>
237       <artifactId>slf4j-api</artifactId>
238     </dependency>
239     <dependency>
240       <groupId>org.apache.commons</groupId>
241       <artifactId>commons-math3</artifactId>
242     </dependency>
243     <dependency>
244       <groupId>org.apache.commons</groupId>
245       <artifactId>commons-lang3</artifactId>
246     </dependency>
247     <dependency>
248       <groupId>org.apache.htrace</groupId>
249       <artifactId>htrace-core4</artifactId>
250     </dependency>
251     <dependency>
252       <groupId>javax.ws.rs</groupId>
253       <artifactId>javax.ws.rs-api</artifactId>
254       <scope>test</scope>
255     </dependency>
256     <dependency>
257       <groupId>org.glassfish.jersey.core</groupId>
258       <artifactId>jersey-client</artifactId>
259     </dependency>
260     <!-- Hadoop needs Netty 3.x at test scope for the minicluster -->
261     <dependency>
262       <groupId>io.netty</groupId>
263       <artifactId>netty</artifactId>
264       <version>${netty.hadoop.version}</version>
265       <scope>test</scope>
266     </dependency>
267     <dependency>
268       <!--For Hadoop-->
269       <groupId>log4j</groupId>
270       <artifactId>log4j</artifactId>
271     </dependency>
272     <dependency>
273       <groupId>junit</groupId>
274       <artifactId>junit</artifactId>
275       <scope>test</scope>
276     </dependency>
277     <dependency>
278       <groupId>org.mockito</groupId>
279       <artifactId>mockito-core</artifactId>
280       <scope>test</scope>
281     </dependency>
282     <dependency>
283       <groupId>com.fasterxml.jackson.core</groupId>
284       <artifactId>jackson-databind</artifactId>
285     </dependency>
286   </dependencies>
288   <profiles>
289     <!-- Skip the tests in this module -->
290     <profile>
291       <id>skipIntegrationTests</id>
292       <activation>
293         <property>
294           <name>skipIntegrationTests</name>
295         </property>
296       </activation>
297       <properties>
298         <skipTests>true</skipTests>
299       </properties>
300     </profile>
303     <!-- profile for building against Hadoop 2.x.  This is the default -->
304     <profile>
305       <id>hadoop-2.0</id>
306       <activation>
307         <property>
308             <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
309             <!--h2--><name>!hadoop.profile</name>
310         </property>
311       </activation>
312       <dependencies>
313         <dependency>
314           <groupId>org.apache.hadoop</groupId>
315           <artifactId>hadoop-mapreduce-client-core</artifactId>
316           <exclusions>
317             <exclusion>
318               <groupId>com.google.guava</groupId>
319               <artifactId>guava</artifactId>
320             </exclusion>
321           </exclusions>
322         </dependency>
323         <dependency>
324           <groupId>org.apache.hadoop</groupId>
325           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
326           <type>test-jar</type>
327           <scope>test</scope>
328           <exclusions>
329             <exclusion>
330               <groupId>com.google.guava</groupId>
331               <artifactId>guava</artifactId>
332             </exclusion>
333           </exclusions>
334         </dependency>
335         <dependency>
336           <groupId>org.apache.hadoop</groupId>
337           <artifactId>hadoop-common</artifactId>
338         </dependency>
339         <dependency>
340           <groupId>org.apache.hadoop</groupId>
341           <artifactId>hadoop-minikdc</artifactId>
342         </dependency>
343       </dependencies>
344       <build>
345         <plugins>
346           <plugin>
347             <artifactId>maven-dependency-plugin</artifactId>
348             <executions>
349               <execution>
350                 <id>create-mrapp-generated-classpath</id>
351                 <phase>generate-test-resources</phase>
352                 <goals>
353                   <goal>build-classpath</goal>
354                 </goals>
355                 <configuration>
356                   <!-- needed to run the unit test for DS to generate
357                   the required classpath that is required in the env
358                   of the launch container in the mini mr/yarn cluster
359                   -->
360                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
361                 </configuration>
362               </execution>
363             </executions>
364           </plugin>
365         </plugins>
366       </build>
367     </profile>
369     <!--
370       profile for building against Hadoop 3.0.x. Activate using:
371        mvn -Dhadoop.profile=3.0
372     -->
373     <profile>
374       <id>hadoop-3.0</id>
375       <activation>
376         <property>
377           <name>hadoop.profile</name>
378           <value>3.0</value>
379         </property>
380       </activation>
381       <properties>
382         <hadoop.version>3.0-SNAPSHOT</hadoop.version>
383       </properties>
384       <dependencies>
385             <dependency>
386           <groupId>org.apache.hadoop</groupId>
387           <artifactId>hadoop-common</artifactId>
388         </dependency>
389         <dependency>
390           <groupId>org.apache.hadoop</groupId>
391           <artifactId>hadoop-minicluster</artifactId>
392         </dependency>
393         <dependency>
394           <groupId>org.apache.hadoop</groupId>
395           <artifactId>hadoop-minikdc</artifactId>
396         </dependency>
397       </dependencies>
398       <build>
399         <plugins>
400           <plugin>
401             <artifactId>maven-dependency-plugin</artifactId>
402             <executions>
403               <execution>
404                 <id>create-mrapp-generated-classpath</id>
405                 <phase>generate-test-resources</phase>
406                 <goals>
407                   <goal>build-classpath</goal>
408                 </goals>
409                 <configuration>
410                   <!-- needed to run the unit test for DS to generate
411                   the required classpath that is required in the env
412                   of the launch container in the mini mr/yarn cluster
413                   -->
414                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
415                 </configuration>
416               </execution>
417             </executions>
418           </plugin>
419         </plugins>
420       </build>
421     </profile>
422   </profiles>
424   <reporting>
425     <plugins>
426     <plugin>
427       <groupId>org.apache.maven.plugins</groupId>
428       <artifactId>maven-surefire-report-plugin</artifactId>
429       <version>${surefire.version}</version>
430       <reportSets>
431         <reportSet>
432           <id>integration-tests</id>
433           <reports>
434             <report>report-only</report>
435           </reports>
436           <configuration>
437             <outputName>failsafe-report</outputName>
438             <reportsDirectories>
439               <reportsDirectory>${project.build.directory}/failsafe-reports</reportsDirectory>
440             </reportsDirectories>
441           </configuration>
442         </reportSet>
443       </reportSets>
444     </plugin>
445   </plugins>
446   </reporting>
448 </project>