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