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