HBASE-26749 Migrate HBase main pre commit job to ci-hbase (#4107)
[hbase.git] / hbase-it / pom.xml
blob890e24f74d783ede1b0eac23f0771154139c4463
1 <?xml version="1.0"?>
2 <project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://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-alpha-3-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       <testResource>
54         <directory>src/test/resources</directory>
55       </testResource>
56     </testResources>
57     <pluginManagement>
58       <plugins>
59         <!-- Make a jar and put the sources in the jar -->
60         <plugin>
61           <groupId>org.apache.maven.plugins</groupId>
62           <artifactId>maven-source-plugin</artifactId>
63         </plugin>
64       <plugin>
65         <!--Make it so assembly:single does nothing in here-->
66         <artifactId>maven-assembly-plugin</artifactId>
67         <configuration>
68           <skipAssembly>true</skipAssembly>
69         </configuration>
70       </plugin>
71         <plugin>
72           <groupId>org.apache.maven.plugins</groupId>
73           <artifactId>maven-failsafe-plugin</artifactId>
74           <version>${surefire.version}</version>
75           <dependencies>
76             <dependency>
77               <groupId>org.apache.maven.surefire</groupId>
78               <artifactId>surefire-junit4</artifactId>
79               <version>${surefire.version}</version>
80             </dependency>
81           </dependencies>
82           <configuration>
83             <includes>
84               <include>${integrationtest.include}</include>
85             </includes>
86             <excludes>
87               <exclude>${unittest.include}</exclude>
88               <exclude>**/*$*</exclude>
89             </excludes>
90             <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
91             <environmentVariables>
92               <LD_LIBRARY_PATH>${env.LD_LIBRARY_PATH}:${project.build.directory}/nativelib</LD_LIBRARY_PATH>
93               <DYLD_LIBRARY_PATH>${env.DYLD_LIBRARY_PATH}:${project.build.directory}/nativelib</DYLD_LIBRARY_PATH>
94               <MALLOC_ARENA_MAX>4</MALLOC_ARENA_MAX>
95             </environmentVariables>
96             <failIfNoTests>false</failIfNoTests>
97             <testFailureIgnore>false</testFailureIgnore>
98           </configuration>
99           <executions>
100             <execution>
101               <id>integration-test</id>
102               <phase>integration-test</phase>
103               <goals>
104                 <goal>integration-test</goal>
105               </goals>
106             </execution>
107             <execution>
108               <id>verify</id>
109               <phase>verify</phase>
110               <goals>
111                 <goal>verify</goal>
112               </goals>
113             </execution>
114           </executions>
115         </plugin>
116       </plugins>
117     </pluginManagement>
119     <plugins>
120       <!--  Run integration tests with mvn verify -->
121       <plugin>
122         <groupId>org.apache.maven.plugins</groupId>
123         <artifactId>maven-failsafe-plugin</artifactId>
124           <configuration>
125             <skip>false</skip>
126             <forkMode>always</forkMode>
127             <!-- TODO: failsafe does timeout, but verify does not fail the build because of the timeout.
128                  I believe it is a failsafe bug, we may consider using surefire -->
129             <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
130             <argLine>-enableassertions -Xmx${failsafe.Xmx}
131                 -Djava.security.egd=file:/dev/./urandom -XX:+CMSClassUnloadingEnabled
132                 -verbose:gc -XX:+PrintCommandLineFlags  -XX:+PrintFlagsFinal</argLine>
133           </configuration>
134       </plugin>
135       <plugin>
136         <groupId>net.revelc.code</groupId>
137         <artifactId>warbucks-maven-plugin</artifactId>
138       </plugin>
139     </plugins>
140   </build>
142   <dependencies>
143     <!--This one is upfront to get in front of
144          any dependency that pulls in jersey-core.
145          Jersey-core has implemented version 1
146          Interfaces of what is in this dependency
147          which does version 2.-->
148     <dependency>
149       <groupId>javax.ws.rs</groupId>
150       <artifactId>javax.ws.rs-api</artifactId>
151       <scope>test</scope>
152     </dependency>
153         <!-- Intra-project dependencies -->
154     <dependency>
155       <groupId>org.apache.hbase</groupId>
156       <artifactId>hbase-annotations</artifactId>
157       <type>test-jar</type>
158       <scope>test</scope>
159     </dependency>
160     <dependency>
161       <groupId>org.apache.hbase</groupId>
162       <artifactId>hbase-logging</artifactId>
163       <type>test-jar</type>
164       <scope>test</scope>
165     </dependency>
166     <dependency>
167       <groupId>org.apache.hbase</groupId>
168       <artifactId>hbase-common</artifactId>
169       <type>jar</type>
170     </dependency>
171     <dependency>
172       <groupId>org.apache.hbase</groupId>
173       <artifactId>hbase-protocol-shaded</artifactId>
174     </dependency>
175     <dependency>
176       <groupId>org.apache.hbase</groupId>
177       <artifactId>hbase-client</artifactId>
178     </dependency>
179     <dependency>
180       <groupId>org.apache.hbase</groupId>
181       <artifactId>hbase-mapreduce</artifactId>
182     </dependency>
183     <dependency>
184       <groupId>org.apache.hbase</groupId>
185       <artifactId>hbase-mapreduce</artifactId>
186       <type>test-jar</type>
187       <scope>test</scope>
188     </dependency>
189     <dependency>
190       <groupId>org.apache.hbase</groupId>
191       <artifactId>hbase-server</artifactId>
192     </dependency>
193     <dependency>
194       <groupId>org.apache.hbase</groupId>
195       <artifactId>hbase-testing-util</artifactId>
196       <exclusions>
197         <!--This dependency pulls in hadoop-minicluster
198              which pulls in the below. It messes up
199              this build at assembly time. See HBASE-22029-->
200         <exclusion>
201          <groupId>com.sun.jersey</groupId>
202          <artifactId>jersey-core</artifactId>
203         </exclusion>
204       </exclusions>
205     </dependency>
206     <dependency>
207       <groupId>org.apache.hbase</groupId>
208       <artifactId>hbase-backup</artifactId>
209     </dependency>
210     <dependency>
211       <groupId>org.apache.hbase.thirdparty</groupId>
212       <artifactId>hbase-shaded-miscellaneous</artifactId>
213     </dependency>
214     <dependency>
215       <groupId>io.dropwizard.metrics</groupId>
216       <artifactId>metrics-core</artifactId>
217     </dependency>
218     <dependency>
219       <groupId>org.slf4j</groupId>
220       <artifactId>slf4j-api</artifactId>
221     </dependency>
222     <dependency>
223       <groupId>org.apache.commons</groupId>
224       <artifactId>commons-math3</artifactId>
225     </dependency>
226     <dependency>
227       <groupId>org.apache.commons</groupId>
228       <artifactId>commons-lang3</artifactId>
229     </dependency>
230     <dependency>
231       <groupId>io.opentelemetry</groupId>
232       <artifactId>opentelemetry-api</artifactId>
233     </dependency>
234     <!-- Hadoop needs Netty 3.x at test scope for the minicluster -->
235     <dependency>
236       <groupId>io.netty</groupId>
237       <artifactId>netty</artifactId>
238       <version>${netty.hadoop.version}</version>
239       <scope>test</scope>
240     </dependency>
241     <dependency>
242       <groupId>org.slf4j</groupId>
243       <artifactId>jcl-over-slf4j</artifactId>
244       <scope>test</scope>
245     </dependency>
246     <dependency>
247       <groupId>org.slf4j</groupId>
248       <artifactId>jul-to-slf4j</artifactId>
249       <scope>test</scope>
250     </dependency>
251     <dependency>
252       <groupId>org.apache.logging.log4j</groupId>
253       <artifactId>log4j-api</artifactId>
254       <scope>test</scope>
255     </dependency>
256     <dependency>
257       <groupId>org.apache.logging.log4j</groupId>
258       <artifactId>log4j-core</artifactId>
259       <scope>test</scope>
260     </dependency>
261     <dependency>
262       <groupId>org.apache.logging.log4j</groupId>
263       <artifactId>log4j-slf4j-impl</artifactId>
264       <scope>test</scope>
265     </dependency>
266     <dependency>
267       <groupId>org.apache.logging.log4j</groupId>
268       <artifactId>log4j-1.2-api</artifactId>
269       <scope>test</scope>
270     </dependency>
271     <dependency>
272       <artifactId>javax.servlet-api</artifactId>
273       <groupId>javax.servlet</groupId>
274       <scope>test</scope>
275     </dependency>
276     <dependency>
277       <groupId>junit</groupId>
278       <artifactId>junit</artifactId>
279       <scope>test</scope>
280     </dependency>
281     <dependency>
282       <groupId>org.hamcrest</groupId>
283       <artifactId>hamcrest-core</artifactId>
284       <scope>test</scope>
285     </dependency>
286     <dependency>
287       <groupId>org.hamcrest</groupId>
288       <artifactId>hamcrest-library</artifactId>
289       <scope>test</scope>
290     </dependency>
291     <dependency>
292       <groupId>org.mockito</groupId>
293       <artifactId>mockito-core</artifactId>
294       <scope>test</scope>
295     </dependency>
296   </dependencies>
298   <profiles>
299     <!-- Skip the tests in this module -->
300     <profile>
301       <id>skipIntegrationTests</id>
302       <activation>
303         <property>
304           <name>skipIntegrationTests</name>
305         </property>
306       </activation>
307       <properties>
308         <skipTests>true</skipTests>
309       </properties>
310     </profile>
311     <profile>
312       <id>build-with-jdk11</id>
313       <activation>
314         <jdk>[1.11,)</jdk>
315       </activation>
316       <dependencies>
317         <dependency>
318           <groupId>com.sun.xml.ws</groupId>
319           <artifactId>jaxws-ri</artifactId>
320           <type>pom</type>
321         </dependency>
322       </dependencies>
323     </profile>
324     <!-- Profile for building against Hadoop 3.0.0. Activate by default -->
325     <profile>
326       <id>hadoop-3.0</id>
327       <activation>
328         <property><name>!hadoop.profile</name></property>
329       </activation>
330       <properties>
331         <hadoop.version>${hadoop-three.version}</hadoop.version>
332       </properties>
333       <dependencies>
334             <dependency>
335           <groupId>org.apache.hadoop</groupId>
336           <artifactId>hadoop-common</artifactId>
337         </dependency>
338         <dependency>
339           <groupId>org.apache.hadoop</groupId>
340           <artifactId>hadoop-minicluster</artifactId>
341           <exclusions>
342             <exclusion>
343               <groupId>javax.xml.bind</groupId>
344               <artifactId>jaxb-api</artifactId>
345             </exclusion>
346             <exclusion>
347               <groupId>javax.ws.rs</groupId>
348               <artifactId>jsr311-api</artifactId>
349             </exclusion>
350           </exclusions>
351         </dependency>
352         <dependency>
353           <groupId>org.apache.hadoop</groupId>
354           <artifactId>hadoop-minikdc</artifactId>
355         </dependency>
356       </dependencies>
357       <build>
358         <plugins>
359           <plugin>
360             <artifactId>maven-dependency-plugin</artifactId>
361             <executions>
362               <execution>
363                 <id>create-mrapp-generated-classpath</id>
364                 <phase>generate-test-resources</phase>
365                 <goals>
366                   <goal>build-classpath</goal>
367                 </goals>
368                 <configuration>
369                   <!-- needed to run the unit test for DS to generate
370                   the required classpath that is required in the env
371                   of the launch container in the mini mr/yarn cluster
372                   -->
373                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
374                 </configuration>
375               </execution>
376             </executions>
377           </plugin>
378         </plugins>
379       </build>
380     </profile>
381     <profile>
382       <id>eclipse-specific</id>
383       <activation>
384         <property>
385           <name>m2e.version</name>
386         </property>
387       </activation>
388       <build>
389         <pluginManagement>
390           <plugins>
391             <!--This plugin's configuration is used to store Eclipse m2e settings
392                  only. It has no influence on the Maven build itself.-->
393             <plugin>
394               <groupId>org.eclipse.m2e</groupId>
395               <artifactId>lifecycle-mapping</artifactId>
396               <configuration>
397                 <lifecycleMappingMetadata>
398                   <pluginExecutions>
399                     <pluginExecution>
400                       <pluginExecutionFilter>
401                         <groupId>org.apache.maven.plugins</groupId>
402                         <artifactId>maven-dependency-plugin</artifactId>
403                         <versionRange>[2.8,)</versionRange>
404                         <goals>
405                           <goal>build-classpath</goal>
406                         </goals>
407                       </pluginExecutionFilter>
408                       <action>
409                         <ignore></ignore>
410                       </action>
411                     </pluginExecution>
412                   </pluginExecutions>
413                 </lifecycleMappingMetadata>
414               </configuration>
415             </plugin>
416           </plugins>
417         </pluginManagement>
418       </build>
419     </profile>
420   </profiles>
422   <reporting>
423     <plugins>
424     <plugin>
425       <groupId>org.apache.maven.plugins</groupId>
426       <artifactId>maven-surefire-report-plugin</artifactId>
427       <version>${surefire.version}</version>
428       <reportSets>
429         <reportSet>
430           <id>integration-tests</id>
431           <reports>
432             <report>report-only</report>
433           </reports>
434           <configuration>
435             <outputName>failsafe-report</outputName>
436             <reportsDirectories>
437               <reportsDirectory>${project.build.directory}/failsafe-reports</reportsDirectory>
438             </reportsDirectories>
439           </configuration>
440         </reportSet>
441       </reportSets>
442     </plugin>
443   </plugins>
444   </reporting>
446 </project>