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