HBASE-24114 [Flakey Tests] TestSnapshotScannerHDFSAclController (#1433)
[hbase.git] / hbase-thrift / pom.xml
blob948a609a32f09fca1755005dbb970aafbc3dc4d2
1 <?xml version="1.0"?>
2 <project xmlns="https://maven.apache.org/POM/4.0.0"
3          xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
4          xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
5   <!--
6 /**
7  * Licensed to the Apache Software Foundation (ASF) under one
8  * or more contributor license agreements.  See the NOTICE file
9  * distributed with this work for additional information
10  * regarding copyright ownership.  The ASF licenses this file
11  * to you under the Apache License, Version 2.0 (the
12  * "License"); you may not use this file except in compliance
13  * with the License.  You may obtain a copy of the License at
14  *
15  *     http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 -->
24   <modelVersion>4.0.0</modelVersion>
25   <parent>
26     <artifactId>hbase-build-configuration</artifactId>
27     <groupId>org.apache.hbase</groupId>
28     <version>3.0.0-SNAPSHOT</version>
29     <relativePath>../hbase-build-configuration</relativePath>
30   </parent>
31   <artifactId>hbase-thrift</artifactId>
32   <name>Apache HBase - Thrift</name>
33   <description>HBase Thrift Server</description>
35   <build>
36     <!-- Makes sure the resources get added before they are processed
37   by placing this first -->
38     <resources>
39       <!-- Add the build webabpps to the classpth -->
40       <resource>
41         <directory>${project.build.directory}</directory>
42         <includes>
43           <include>hbase-webapps/**</include>
44         </includes>
45       </resource>
46       <resource>
47         <directory>src/main/resources/</directory>
48         <includes>
49           <include>**/*.thrift</include>
50         </includes>
51       </resource>
52     </resources>
53     <testResources>
54       <testResource>
55         <directory>src/test/resources/META-INF/</directory>
56         <targetPath>META-INF/</targetPath>
57         <includes>
58           <include>LICENSE</include>
59           <include>NOTICE</include>
60         </includes>
61         <filtering>true</filtering>
62       </testResource>
63       <testResource>
64         <directory>src/test/resources</directory>
65         <includes>
66           <include>**/**</include>
67         </includes>
68       </testResource>
69     </testResources>
71     <plugins>
72       <plugin>
73         <!--Make it so assembly:single does nothing in here-->
74         <artifactId>maven-assembly-plugin</artifactId>
75         <configuration>
76           <skipAssembly>true</skipAssembly>
77         </configuration>
78       </plugin>
79       <!-- General ant tasks, bound to different build phases -->
80       <plugin>
81         <artifactId>maven-antrun-plugin</artifactId>
82         <executions>
83           <!-- Generate web app sources -->
84           <execution>
85             <id>generate</id>
86             <phase>generate-sources</phase>
87             <configuration>
88               <target>
89                 <property name="build.webapps" location="${project.build.directory}/hbase-webapps"/>
90                 <property name="src.webapps"
91                           location="${basedir}/src/main/resources/hbase-webapps"/>
92                 <property name="generated.sources"
93                           location="${project.build.directory}/generated-sources"/>
94                 <mkdir dir="${build.webapps}"/>
95                 <copy todir="${build.webapps}">
96                   <fileset dir="${src.webapps}">
97                     <exclude name="**/*.jsp"/>
98                     <exclude name="**/.*"/>
99                     <exclude name="**/*~"/>
100                   </fileset>
101                 </copy>
102                 <!--The compile.classpath is passed in by maven -->
103                 <taskdef classname="org.apache.jasper.JspC" name="jspcompiler"
104                          classpathref="maven.compile.classpath"/>
105                 <mkdir dir="${build.webapps}/thrift/WEB-INF"/>
106                 <jspcompiler uriroot="${src.webapps}/thrift" outputdir="${generated.sources}/java"
107                              package="org.apache.hadoop.hbase.generated.thrift"
108                              webxml="${build.webapps}/thrift/WEB-INF/web.xml"/>
109               </target>
110             </configuration>
111             <goals>
112               <goal>run</goal>
113             </goals>
114           </execution>
115         </executions>
116       </plugin>
117       <plugin>
118         <groupId>org.codehaus.mojo</groupId>
119         <artifactId>build-helper-maven-plugin</artifactId>
120         <executions>
121           <!-- Add the generated sources -->
122           <execution>
123             <id>jspcSource-packageInfo-source</id>
124             <phase>generate-sources</phase>
125             <goals>
126               <goal>add-source</goal>
127             </goals>
128             <configuration>
129               <sources>
130                 <source>${project.build.directory}/generated-sources/java</source>
131               </sources>
132             </configuration>
133           </execution>
134         </executions>
135       </plugin>
136       <!-- Make a jar and put the sources in the jar -->
137       <plugin>
138         <groupId>org.apache.maven.plugins</groupId>
139         <artifactId>maven-source-plugin</artifactId>
140       </plugin>
141       <plugin>
142         <groupId>org.apache.maven.plugins</groupId>
143         <artifactId>maven-checkstyle-plugin</artifactId>
144         <configuration>
145           <failOnViolation>true</failOnViolation>
146         </configuration>
147       </plugin>
148       <plugin>
149         <groupId>net.revelc.code</groupId>
150         <artifactId>warbucks-maven-plugin</artifactId>
151       </plugin>
152     </plugins>
153   </build>
155   <dependencies>
156     <!-- Intra-project dependencies -->
157     <dependency>
158       <groupId>org.apache.hbase</groupId>
159       <artifactId>hbase-common</artifactId>
160       <type>jar</type>
161     </dependency>
162     <dependency>
163       <groupId>org.apache.hbase</groupId>
164       <artifactId>hbase-annotations</artifactId>
165       <type>test-jar</type>
166       <scope>test</scope>
167     </dependency>
168     <dependency>
169       <groupId>org.apache.hbase</groupId>
170       <artifactId>hbase-client</artifactId>
171     </dependency>
172     <dependency>
173       <groupId>org.apache.hbase.thirdparty</groupId>
174       <artifactId>hbase-shaded-miscellaneous</artifactId>
175     </dependency>
176     <dependency>
177       <groupId>org.slf4j</groupId>
178       <artifactId>slf4j-api</artifactId>
179     </dependency>
180     <dependency>
181       <groupId>org.apache.commons</groupId>
182       <artifactId>commons-lang3</artifactId>
183     </dependency>
184     <dependency>
185       <groupId>org.apache.hbase</groupId>
186       <artifactId>hbase-server</artifactId>
187     </dependency>
188     <dependency>
189       <groupId>org.apache.hbase</groupId>
190       <artifactId>hbase-testing-util</artifactId>
191       <scope>test</scope>
192     </dependency>
193     <dependency>
194       <groupId>org.apache.hbase</groupId>
195       <artifactId>hbase-hadoop-compat</artifactId>
196     </dependency>
197     <dependency>
198       <groupId>org.apache.hbase</groupId>
199       <artifactId>${compat.module}</artifactId>
200       <version>${project.version}</version>
201     </dependency>
202     <dependency>
203       <groupId>org.apache.thrift</groupId>
204       <artifactId>libthrift</artifactId>
205     </dependency>
206     <dependency>
207       <groupId>org.eclipse.jetty</groupId>
208       <artifactId>jetty-server</artifactId>
209     </dependency>
210     <dependency>
211       <groupId>org.eclipse.jetty</groupId>
212       <artifactId>jetty-servlet</artifactId>
213     </dependency>
214     <dependency>
215       <groupId>junit</groupId>
216       <artifactId>junit</artifactId>
217       <scope>test</scope>
218     </dependency>
219     <dependency>
220       <groupId>org.eclipse.jetty</groupId>
221       <artifactId>jetty-http</artifactId>
222     </dependency>
223     <dependency>
224       <groupId>javax.servlet</groupId>
225       <artifactId>javax.servlet-api</artifactId>
226     </dependency>
227     <dependency>
228       <groupId>org.eclipse.jetty</groupId>
229       <artifactId>jetty-util</artifactId>
230     </dependency>
231     <dependency>
232       <groupId>com.github.stephenc.findbugs</groupId>
233       <artifactId>findbugs-annotations</artifactId>
234       <scope>compile</scope>
235       <optional>true</optional>
236     </dependency>
237     <dependency>
238       <!--For JspC used in ant task-->
239       <groupId>org.glassfish.web</groupId>
240       <artifactId>javax.servlet.jsp</artifactId>
241     </dependency>
242     <!-- Specifically needed for jetty-jsp, included
243          to bypass version scanning that hits a bad repo
244          see HBASE-18831 -->
245     <dependency>
246       <groupId>org.glassfish</groupId>
247       <artifactId>javax.el</artifactId>
248     </dependency>
249     <dependency>
250       <groupId>org.apache.kerby</groupId>
251       <artifactId>kerb-simplekdc</artifactId>
252       <scope>test</scope>
253     </dependency>
254   </dependencies>
256   <profiles>
257     <!-- Needs to make the profile in apache parent pom -->
258     <profile>
259       <id>apache-release</id>
260       <build>
261         <plugins>
262           <plugin>
263             <groupId>org.apache.maven.plugins</groupId>
264             <artifactId>maven-resources-plugin</artifactId>
265             <executions>
266               <execution>
267                 <id>license-javadocs</id>
268                 <phase>prepare-package</phase>
269                 <goals>
270                   <goal>copy-resources</goal>
271                 </goals>
272                 <configuration>
273                   <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
274                   <resources>
275                     <resource>
276                       <directory>src/main/javadoc/META-INF/</directory>
277                       <targetPath>META-INF/</targetPath>
278                       <includes>
279                         <include>LICENSE</include>
280                         <include>NOTICE</include>
281                       </includes>
282                       <filtering>true</filtering>
283                     </resource>
284                   </resources>
285                 </configuration>
286               </execution>
287             </executions>
288           </plugin>
289         </plugins>
290       </build>
291     </profile>
292     <!-- Skip the tests in this module -->
293     <profile>
294       <id>skipThriftTests</id>
295       <activation>
296         <property>
297           <name>skipThriftTests</name>
298         </property>
299       </activation>
300       <properties>
301         <surefire.skipFirstPart>true</surefire.skipFirstPart>
302         <surefire.skipSecondPart>true</surefire.skipSecondPart>
303       </properties>
304     </profile>
306     <!--
307       Profile for regenerating the thrift java classes.
308       The generated files are to be committed to version control.
309       Activate using:
310        mvn compile -Pcompile-thrift
311     -->
312     <profile>
313       <id>compile-thrift</id>
314       <build>
315         <plugins>
316           <plugin>
317             <groupId>org.apache.maven.plugins</groupId>
318             <artifactId>maven-enforcer-plugin</artifactId>
319             <executions>
320               <execution>
321                 <id>enforce-thrift-version</id>
322                 <goals>
323                   <goal>enforce</goal>
324                 </goals>
325                 <configuration>
326                   <rules>
327                     <requireProperty>
328                       <property>thrift.version</property>
329                       <message>"The Thrift version must be specified."</message>
330                       <regex>0\.12\.0</regex>
331                       <regexMessage>
334 [FATAL] ==========================================================================================
335 [FATAL] HBase Thrift requires the thrift generator version 0.12.0.
336 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
337 [FATAL] ==========================================================================================
340                       </regexMessage>
341                     </requireProperty>
342                   </rules>
343                   <fail>true</fail>
344                 </configuration>
345               </execution>
346             </executions>
347           </plugin>
348           <plugin>
349             <groupId>org.codehaus.mojo</groupId>
350             <artifactId>exec-maven-plugin</artifactId>
351             <version>${exec.maven.version}</version>
352             <executions>
353               <execution>
354                 <id>check-thrift-version</id>
355                 <phase>generate-sources</phase>
356                 <goals>
357                   <goal>exec</goal>
358                 </goals>
359                 <configuration>
360                   <executable>sh</executable>
361                   <workingDirectory>${basedir}</workingDirectory>
362                   <arguments>
363                     <argument>-c</argument>
364                     <argument>${thrift.path} -version | \
365                       fgrep 'Thrift version ${thrift.version}' &amp;&amp; exit 0;
366                       echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
367                       exit 1</argument>
368                   </arguments>
369                 </configuration>
370               </execution>
371               <execution>
372                 <id>thrift</id>
373                 <phase>generate-sources</phase>
374                 <goals>
375                   <goal>exec</goal>
376                 </goals>
377                 <configuration>
378                   <executable>${thrift.path}</executable>
379                   <workingDirectory>${basedir}</workingDirectory>
380                   <arguments>
381                     <argument>-strict</argument>
382                     <argument>--gen</argument>
383                     <argument>java</argument>
384                     <argument>-out</argument>
385                     <argument>${basedir}/src/main/java</argument>
386                     <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
387                   </arguments>
388                 </configuration>
389               </execution>
390               <execution>
391                 <id>thrift2</id>
392                 <phase>generate-sources</phase>
393                 <goals>
394                   <goal>exec</goal>
395                 </goals>
396                 <configuration>
397                   <executable>${thrift.path}</executable>
398                   <workingDirectory>${basedir}</workingDirectory>
399                   <arguments>
400                     <argument>-strict</argument>
401                     <argument>--gen</argument>
402                     <argument>java</argument>
403                     <argument>-out</argument>
404                     <argument>${basedir}/src/main/java</argument>
405                     <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
406                   </arguments>
407                 </configuration>
408               </execution>
409             </executions>
410           </plugin>
411         </plugins>
412       </build>
413     </profile>
415     <!-- profile against Hadoop 2.x: This is the default -->
416     <profile>
417       <id>hadoop-2.0</id>
418       <activation>
419         <property>
420           <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
421           <!--h2-->
422           <name>!hadoop.profile</name>
423         </property>
424       </activation>
425       <dependencies>
426         <dependency>
427           <groupId>org.apache.hadoop</groupId>
428           <artifactId>hadoop-client</artifactId>
429           <exclusions>
430             <exclusion>
431               <groupId>com.google.guava</groupId>
432               <artifactId>guava</artifactId>
433             </exclusion>
434           </exclusions>
435         </dependency>
436         <dependency>
437           <groupId>org.apache.hadoop</groupId>
438           <artifactId>hadoop-mapreduce-client-core</artifactId>
439           <exclusions>
440             <exclusion>
441               <groupId>com.google.guava</groupId>
442               <artifactId>guava</artifactId>
443             </exclusion>
444           </exclusions>
445         </dependency>
446         <dependency>
447           <groupId>org.apache.hadoop</groupId>
448           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
449           <type>test-jar</type>
450           <scope>test</scope>
451           <exclusions>
452             <exclusion>
453               <groupId>com.google.guava</groupId>
454               <artifactId>guava</artifactId>
455             </exclusion>
456           </exclusions>
457         </dependency>
458         <dependency>
459           <groupId>org.apache.hadoop</groupId>
460           <artifactId>hadoop-common</artifactId>
461         </dependency>
462         <dependency>
463           <groupId>org.apache.hadoop</groupId>
464           <artifactId>hadoop-minicluster</artifactId>
465           <scope>test</scope>
466           <exclusions>
467             <exclusion>
468               <groupId>com.google.guava</groupId>
469               <artifactId>guava</artifactId>
470             </exclusion>
471             <exclusion>
472               <groupId>org.apache.zookeeper</groupId>
473               <artifactId>zookeeper</artifactId>
474             </exclusion>
475           </exclusions>
476         </dependency>
477       </dependencies>
478       <build>
479         <plugins>
480           <plugin>
481             <artifactId>maven-dependency-plugin</artifactId>
482             <executions>
483               <execution>
484                 <id>create-mrapp-generated-classpath</id>
485                 <phase>generate-test-resources</phase>
486                 <goals>
487                   <goal>build-classpath</goal>
488                 </goals>
489                 <configuration>
490                   <!-- needed to run the unit test for DS to generate
491                   the required classpath that is required in the env
492                   of the launch container in the mini mr/yarn cluster
493                   -->
494                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
495                   </outputFile>
496                 </configuration>
497               </execution>
498             </executions>
499           </plugin>
500         </plugins>
501       </build>
502     </profile>
504     <!--
505       profile for building against Hadoop 3.0.x. Activate using:
506        mvn -Dhadoop.profile=3.0
507     -->
508     <profile>
509       <id>hadoop-3.0</id>
510       <activation>
511         <property>
512           <name>hadoop.profile</name>
513           <value>3.0</value>
514         </property>
515       </activation>
516       <dependencies>
517         <dependency>
518           <groupId>org.apache.hadoop</groupId>
519           <artifactId>hadoop-common</artifactId>
520         </dependency>
521         <dependency>
522           <groupId>org.apache.hadoop</groupId>
523           <artifactId>hadoop-minicluster</artifactId>
524         </dependency>
525       </dependencies>
526       <build>
527         <plugins>
528           <plugin>
529             <artifactId>maven-dependency-plugin</artifactId>
530             <executions>
531               <execution>
532                 <id>create-mrapp-generated-classpath</id>
533                 <phase>generate-test-resources</phase>
534                 <goals>
535                   <goal>build-classpath</goal>
536                 </goals>
537                 <configuration>
538                   <!-- needed to run the unit test for DS to generate
539                   the required classpath that is required in the env
540                   of the launch container in the mini mr/yarn cluster
541                   -->
542                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
543                   </outputFile>
544                 </configuration>
545               </execution>
546             </executions>
547           </plugin>
548         </plugins>
549       </build>
550     </profile>
551     <profile>
552       <id>eclipse-specific</id>
553       <activation>
554         <property>
555           <name>m2e.version</name>
556         </property>
557       </activation>
558       <build>
559         <pluginManagement>
560           <plugins>
561             <!--This plugin's configuration is used to store Eclipse m2e settings
562                  only. It has no influence on the Maven build itself.-->
563             <plugin>
564               <groupId>org.eclipse.m2e</groupId>
565               <artifactId>lifecycle-mapping</artifactId>
566               <configuration>
567                 <lifecycleMappingMetadata>
568                   <pluginExecutions>
569                     <pluginExecution>
570                       <pluginExecutionFilter>
571                         <groupId>org.apache.maven.plugins</groupId>
572                         <artifactId>maven-antrun-plugin</artifactId>
573                         <versionRange>[1.6,)</versionRange>
574                         <goals>
575                           <goal>run</goal>
576                         </goals>
577                       </pluginExecutionFilter>
578                       <action>
579                         <ignore></ignore>
580                       </action>
581                     </pluginExecution>
582                     <pluginExecution>
583                       <pluginExecutionFilter>
584                         <groupId>org.apache.maven.plugins</groupId>
585                         <artifactId>maven-dependency-plugin</artifactId>
586                         <versionRange>[2.8,)</versionRange>
587                         <goals>
588                           <goal>build-classpath</goal>
589                         </goals>
590                       </pluginExecutionFilter>
591                       <action>
592                         <ignore></ignore>
593                       </action>
594                     </pluginExecution>
595                   </pluginExecutions>
596                 </lifecycleMappingMetadata>
597               </configuration>
598             </plugin>
599           </plugins>
600         </pluginManagement>
601       </build>
602     </profile>
603   </profiles>
604 </project>