HBASE-26429 HeapMemoryManager fails memstore flushes with NPE if enabled (#3819)
[hbase.git] / hbase-thrift / pom.xml
blob02e7814f256bf3ddad15cf0f941b4494bc587830
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>2.4.9-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>net.revelc.code</groupId>
143         <artifactId>warbucks-maven-plugin</artifactId>
144       </plugin>
145     </plugins>
146   </build>
148   <dependencies>
149     <!-- Intra-project dependencies -->
150     <dependency>
151       <groupId>org.apache.hbase</groupId>
152       <artifactId>hbase-logging</artifactId>
153       <type>test-jar</type>
154       <scope>test</scope>
155     </dependency>
156     <dependency>
157       <groupId>org.apache.hbase</groupId>
158       <artifactId>hbase-common</artifactId>
159       <type>jar</type>
160     </dependency>
161     <dependency>
162       <groupId>org.apache.hbase</groupId>
163       <artifactId>hbase-annotations</artifactId>
164       <type>test-jar</type>
165       <scope>test</scope>
166     </dependency>
167     <dependency>
168       <groupId>org.apache.hbase</groupId>
169       <artifactId>hbase-protocol</artifactId>
170     </dependency>
171     <dependency>
172       <groupId>org.apache.hbase</groupId>
173       <artifactId>hbase-client</artifactId>
174     </dependency>
175     <dependency>
176       <groupId>org.apache.hbase.thirdparty</groupId>
177       <artifactId>hbase-shaded-miscellaneous</artifactId>
178     </dependency>
179     <dependency>
180       <groupId>org.slf4j</groupId>
181       <artifactId>slf4j-api</artifactId>
182     </dependency>
183     <dependency>
184       <groupId>org.apache.commons</groupId>
185       <artifactId>commons-lang3</artifactId>
186     </dependency>
187     <dependency>
188       <groupId>org.apache.hbase</groupId>
189       <artifactId>hbase-server</artifactId>
190     </dependency>
191     <dependency>
192       <groupId>org.apache.hbase</groupId>
193       <artifactId>hbase-asyncfs</artifactId>
194       <type>test-jar</type>
195       <scope>test</scope>
196     </dependency>
197     <dependency>
198       <groupId>org.apache.hbase</groupId>
199       <artifactId>hbase-testing-util</artifactId>
200       <scope>test</scope>
201     </dependency>
202     <dependency>
203       <groupId>org.apache.hbase</groupId>
204       <artifactId>hbase-hadoop-compat</artifactId>
205     </dependency>
206     <dependency>
207       <groupId>org.apache.hbase</groupId>
208       <artifactId>${compat.module}</artifactId>
209       <version>${project.version}</version>
210     </dependency>
211     <dependency>
212       <groupId>org.apache.thrift</groupId>
213       <artifactId>libthrift</artifactId>
214     </dependency>
215     <dependency>
216       <groupId>junit</groupId>
217       <artifactId>junit</artifactId>
218       <scope>test</scope>
219     </dependency>
220     <dependency>
221       <groupId>javax.servlet</groupId>
222       <artifactId>javax.servlet-api</artifactId>
223     </dependency>
224     <dependency>
225       <groupId>com.github.stephenc.findbugs</groupId>
226       <artifactId>findbugs-annotations</artifactId>
227       <scope>compile</scope>
228       <optional>true</optional>
229     </dependency>
230     <dependency>
231       <!--For JspC used in ant task-->
232       <groupId>org.glassfish.web</groupId>
233       <artifactId>javax.servlet.jsp</artifactId>
234     </dependency>
235     <!-- Specifically needed for jetty-jsp, included
236          to bypass version scanning that hits a bad repo
237          see HBASE-18831 -->
238     <dependency>
239       <groupId>org.glassfish</groupId>
240       <artifactId>javax.el</artifactId>
241     </dependency>
242     <dependency>
243       <groupId>org.apache.kerby</groupId>
244       <artifactId>kerb-simplekdc</artifactId>
245       <scope>test</scope>
246     </dependency>
247     <dependency>
248       <groupId>org.slf4j</groupId>
249       <artifactId>jcl-over-slf4j</artifactId>
250       <scope>test</scope>
251     </dependency>
252     <dependency>
253       <groupId>org.slf4j</groupId>
254       <artifactId>jul-to-slf4j</artifactId>
255       <scope>test</scope>
256     </dependency>
257     <dependency>
258       <groupId>org.slf4j</groupId>
259       <artifactId>slf4j-log4j12</artifactId>
260       <scope>test</scope>
261     </dependency>
262     <dependency>
263       <groupId>log4j</groupId>
264       <artifactId>log4j</artifactId>
265       <scope>test</scope>
266     </dependency>
267   </dependencies>
269   <profiles>
270     <!-- Needs to make the profile in apache parent pom -->
271     <profile>
272       <id>apache-release</id>
273       <build>
274         <plugins>
275           <plugin>
276             <groupId>org.apache.maven.plugins</groupId>
277             <artifactId>maven-resources-plugin</artifactId>
278             <executions>
279               <execution>
280                 <id>license-javadocs</id>
281                 <phase>prepare-package</phase>
282                 <goals>
283                   <goal>copy-resources</goal>
284                 </goals>
285                 <configuration>
286                   <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
287                   <resources>
288                     <resource>
289                       <directory>src/main/javadoc/META-INF/</directory>
290                       <targetPath>META-INF/</targetPath>
291                       <includes>
292                         <include>LICENSE</include>
293                         <include>NOTICE</include>
294                       </includes>
295                       <filtering>true</filtering>
296                     </resource>
297                   </resources>
298                 </configuration>
299               </execution>
300             </executions>
301           </plugin>
302         </plugins>
303       </build>
304     </profile>
305     <!-- Skip the tests in this module -->
306     <profile>
307       <id>skipThriftTests</id>
308       <activation>
309         <property>
310           <name>skipThriftTests</name>
311         </property>
312       </activation>
313       <properties>
314         <surefire.skipFirstPart>true</surefire.skipFirstPart>
315         <surefire.skipSecondPart>true</surefire.skipSecondPart>
316       </properties>
317     </profile>
319     <!--
320       Profile for regenerating the thrift java classes.
321       The generated files are to be committed to version control.
322       Activate using:
323        mvn compile -Pcompile-thrift
324     -->
325     <profile>
326       <id>compile-thrift</id>
327       <build>
328         <plugins>
329           <plugin>
330             <groupId>org.apache.maven.plugins</groupId>
331             <artifactId>maven-enforcer-plugin</artifactId>
332             <executions>
333               <execution>
334                 <id>enforce-thrift-version</id>
335                 <goals>
336                   <goal>enforce</goal>
337                 </goals>
338                 <configuration>
339                   <rules>
340                     <requireProperty>
341                       <property>thrift.version</property>
342                       <message>"The Thrift version must be specified."</message>
343                       <regex>0\.14\.1</regex>
344                       <regexMessage>
347 [FATAL] ==========================================================================================
348 [FATAL] HBase Thrift requires the thrift generator version 0.14.1.
349 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
350 [FATAL] ==========================================================================================
353                       </regexMessage>
354                     </requireProperty>
355                   </rules>
356                   <fail>true</fail>
357                 </configuration>
358               </execution>
359             </executions>
360           </plugin>
361           <plugin>
362             <groupId>org.codehaus.mojo</groupId>
363             <artifactId>exec-maven-plugin</artifactId>
364             <version>${exec.maven.version}</version>
365             <executions>
366               <execution>
367                 <id>check-thrift-version</id>
368                 <phase>generate-sources</phase>
369                 <goals>
370                   <goal>exec</goal>
371                 </goals>
372                 <configuration>
373                   <executable>sh</executable>
374                   <workingDirectory>${basedir}</workingDirectory>
375                   <arguments>
376                     <argument>-c</argument>
377                     <argument>${thrift.path} -version | \
378                       fgrep 'Thrift version ${thrift.version}' &amp;&amp; exit 0;
379                       echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
380                       exit 1</argument>
381                   </arguments>
382                 </configuration>
383               </execution>
384               <execution>
385                 <id>thrift</id>
386                 <phase>generate-sources</phase>
387                 <goals>
388                   <goal>exec</goal>
389                 </goals>
390                 <configuration>
391                   <executable>${thrift.path}</executable>
392                   <workingDirectory>${basedir}</workingDirectory>
393                   <arguments>
394                     <argument>-strict</argument>
395                     <argument>--gen</argument>
396                     <argument>java</argument>
397                     <argument>-out</argument>
398                     <argument>${basedir}/src/main/java</argument>
399                     <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
400                   </arguments>
401                 </configuration>
402               </execution>
403               <execution>
404                 <id>thrift2</id>
405                 <phase>generate-sources</phase>
406                 <goals>
407                   <goal>exec</goal>
408                 </goals>
409                 <configuration>
410                   <executable>${thrift.path}</executable>
411                   <workingDirectory>${basedir}</workingDirectory>
412                   <arguments>
413                     <argument>-strict</argument>
414                     <argument>--gen</argument>
415                     <argument>java</argument>
416                     <argument>-out</argument>
417                     <argument>${basedir}/src/main/java</argument>
418                     <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
419                   </arguments>
420                 </configuration>
421               </execution>
422             </executions>
423           </plugin>
424         </plugins>
425       </build>
426     </profile>
428     <!-- profile against Hadoop 2.x: This is the default -->
429     <profile>
430       <id>hadoop-2.0</id>
431       <activation>
432         <property>
433           <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
434           <!--h2-->
435           <name>!hadoop.profile</name>
436         </property>
437       </activation>
438       <dependencies>
439         <dependency>
440           <groupId>org.apache.hadoop</groupId>
441           <artifactId>hadoop-client</artifactId>
442           <exclusions>
443             <exclusion>
444               <groupId>com.google.guava</groupId>
445               <artifactId>guava</artifactId>
446             </exclusion>
447             <exclusion>
448               <groupId>javax.xml.bind</groupId>
449               <artifactId>jaxb-api</artifactId>
450             </exclusion>
451           </exclusions>
452         </dependency>
453         <dependency>
454           <groupId>org.apache.hadoop</groupId>
455           <artifactId>hadoop-mapreduce-client-core</artifactId>
456           <exclusions>
457             <exclusion>
458               <groupId>com.google.guava</groupId>
459               <artifactId>guava</artifactId>
460             </exclusion>
461             <exclusion>
462               <groupId>javax.xml.bind</groupId>
463               <artifactId>jaxb-api</artifactId>
464             </exclusion>
465           </exclusions>
466         </dependency>
467         <dependency>
468           <groupId>org.apache.hadoop</groupId>
469           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
470           <type>test-jar</type>
471           <scope>test</scope>
472           <exclusions>
473             <exclusion>
474               <groupId>com.google.guava</groupId>
475               <artifactId>guava</artifactId>
476             </exclusion>
477           </exclusions>
478         </dependency>
479         <dependency>
480           <groupId>org.apache.hadoop</groupId>
481           <artifactId>hadoop-common</artifactId>
482         </dependency>
483         <dependency>
484           <groupId>org.apache.hadoop</groupId>
485           <artifactId>hadoop-minicluster</artifactId>
486           <scope>test</scope>
487           <exclusions>
488             <exclusion>
489               <groupId>com.google.guava</groupId>
490               <artifactId>guava</artifactId>
491             </exclusion>
492             <exclusion>
493               <groupId>org.apache.zookeeper</groupId>
494               <artifactId>zookeeper</artifactId>
495             </exclusion>
496             <exclusion>
497               <groupId>javax.xml.bind</groupId>
498               <artifactId>jaxb-api</artifactId>
499             </exclusion>
500           </exclusions>
501         </dependency>
502       </dependencies>
503       <build>
504         <plugins>
505           <plugin>
506             <artifactId>maven-dependency-plugin</artifactId>
507             <executions>
508               <execution>
509                 <id>create-mrapp-generated-classpath</id>
510                 <phase>generate-test-resources</phase>
511                 <goals>
512                   <goal>build-classpath</goal>
513                 </goals>
514                 <configuration>
515                   <!-- needed to run the unit test for DS to generate
516                   the required classpath that is required in the env
517                   of the launch container in the mini mr/yarn cluster
518                   -->
519                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
520                   </outputFile>
521                 </configuration>
522               </execution>
523             </executions>
524           </plugin>
525         </plugins>
526       </build>
527     </profile>
529     <!--
530       profile for building against Hadoop 3.0.x. Activate using:
531        mvn -Dhadoop.profile=3.0
532     -->
533     <profile>
534       <id>hadoop-3.0</id>
535       <activation>
536         <property>
537           <name>hadoop.profile</name>
538           <value>3.0</value>
539         </property>
540       </activation>
541       <dependencies>
542         <dependency>
543           <groupId>org.apache.hadoop</groupId>
544           <artifactId>hadoop-common</artifactId>
545         </dependency>
546         <dependency>
547           <groupId>org.apache.hadoop</groupId>
548           <artifactId>hadoop-minicluster</artifactId>
549           <exclusions>
550             <exclusion>
551               <groupId>com.google.guava</groupId>
552               <artifactId>guava</artifactId>
553             </exclusion>
554             <exclusion>
555               <groupId>javax.xml.bind</groupId>
556               <artifactId>jaxb-api</artifactId>
557             </exclusion>
558             <exclusion>
559               <groupId>javax.ws.rs</groupId>
560               <artifactId>jsr311-api</artifactId>
561             </exclusion>
562           </exclusions>
563         </dependency>
564       </dependencies>
565       <build>
566         <plugins>
567           <plugin>
568             <artifactId>maven-dependency-plugin</artifactId>
569             <executions>
570               <execution>
571                 <id>create-mrapp-generated-classpath</id>
572                 <phase>generate-test-resources</phase>
573                 <goals>
574                   <goal>build-classpath</goal>
575                 </goals>
576                 <configuration>
577                   <!-- needed to run the unit test for DS to generate
578                   the required classpath that is required in the env
579                   of the launch container in the mini mr/yarn cluster
580                   -->
581                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
582                   </outputFile>
583                 </configuration>
584               </execution>
585             </executions>
586           </plugin>
587         </plugins>
588       </build>
589     </profile>
590     <profile>
591       <id>eclipse-specific</id>
592       <activation>
593         <property>
594           <name>m2e.version</name>
595         </property>
596       </activation>
597       <build>
598         <pluginManagement>
599           <plugins>
600             <!--This plugin's configuration is used to store Eclipse m2e settings
601                  only. It has no influence on the Maven build itself.-->
602             <plugin>
603               <groupId>org.eclipse.m2e</groupId>
604               <artifactId>lifecycle-mapping</artifactId>
605               <configuration>
606                 <lifecycleMappingMetadata>
607                   <pluginExecutions>
608                     <pluginExecution>
609                       <pluginExecutionFilter>
610                         <groupId>org.apache.maven.plugins</groupId>
611                         <artifactId>maven-antrun-plugin</artifactId>
612                         <versionRange>[1.6,)</versionRange>
613                         <goals>
614                           <goal>run</goal>
615                         </goals>
616                       </pluginExecutionFilter>
617                       <action>
618                         <ignore></ignore>
619                       </action>
620                     </pluginExecution>
621                     <pluginExecution>
622                       <pluginExecutionFilter>
623                         <groupId>org.apache.maven.plugins</groupId>
624                         <artifactId>maven-dependency-plugin</artifactId>
625                         <versionRange>[2.8,)</versionRange>
626                         <goals>
627                           <goal>build-classpath</goal>
628                         </goals>
629                       </pluginExecutionFilter>
630                       <action>
631                         <ignore></ignore>
632                       </action>
633                     </pluginExecution>
634                   </pluginExecutions>
635                 </lifecycleMappingMetadata>
636               </configuration>
637             </plugin>
638           </plugins>
639         </pluginManagement>
640       </build>
641     </profile>
642   </profiles>
643 </project>