HBASE-13911 update java/hadoop prereqs for 1.2
[hbase.git] / hbase-thrift / pom.xml
blob43c93d19ace80706b62f715e2ed673edfb6cd5a4
1 <?xml version="1.0"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0"
3          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://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</artifactId>
27     <groupId>org.apache.hbase</groupId>
28     <version>2.0.0-SNAPSHOT</version>
29     <relativePath>..</relativePath>
30   </parent>
31   <artifactId>hbase-thrift</artifactId>
32   <name>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     </resources>
48     <plugins>
49       <plugin>
50         <groupId>org.apache.maven.plugins</groupId>
51         <artifactId>maven-site-plugin</artifactId>
52         <configuration>
53           <skip>true</skip>
54         </configuration>
55       </plugin>
56       <plugin>
57         <!--Make it so assembly:single does nothing in here-->
58         <artifactId>maven-assembly-plugin</artifactId>
59         <version>${maven.assembly.version}</version>
60         <configuration>
61           <skipAssembly>true</skipAssembly>
62         </configuration>
63       </plugin>
64       <plugin>
65         <artifactId>maven-surefire-plugin</artifactId>
66         <!-- Always skip the second part executions, since we only run
67           simple unit tests in this module -->
68         <executions>
69           <execution>
70             <id>secondPartTestsExecution</id>
71             <phase>test</phase>
72             <goals>
73               <goal>test</goal>
74             </goals>
75             <configuration>
76               <skip>true</skip>
77              <properties>
78                <property>
79                  <name>listener</name>
80                  <value>org.apache.hadoop.hbase.ServerResourceCheckerJUnitListener</value>
81                </property>
82              </properties>
83              <systemPropertyVariables>
84                <test.build.webapps>target/test-classes/webapps</test.build.webapps>
85              </systemPropertyVariables>
86             </configuration>
87           </execution>
88         </executions>
89       </plugin>
90       <!-- General ant tasks, bound to different build phases -->
91       <plugin>
92         <artifactId>maven-antrun-plugin</artifactId>
93         <executions>
94           <!-- Generate web app sources -->
95           <execution>
96             <id>generate</id>
97             <phase>generate-sources</phase>
98             <configuration>
99               <target>
100                 <property name="build.webapps" location="${project.build.directory}/hbase-webapps"/>
101                 <property name="src.webapps"
102                           location="${basedir}/src/main/resources/hbase-webapps"/>
103                 <property name="generated.sources"
104                           location="${project.build.directory}/generated-sources"/>
105                 <mkdir dir="${build.webapps}"/>
106                 <copy todir="${build.webapps}">
107                   <fileset dir="${src.webapps}">
108                     <exclude name="**/*.jsp"/>
109                     <exclude name="**/.*"/>
110                     <exclude name="**/*~"/>
111                   </fileset>
112                 </copy>
113                 <!--The compile.classpath is passed in by maven -->
114                 <taskdef classname="org.apache.jasper.JspC" name="jspcompiler"
115                          classpathref="maven.compile.classpath"/>
116                 <mkdir dir="${build.webapps}/thrift/WEB-INF"/>
117                 <jspcompiler uriroot="${src.webapps}/thrift" outputdir="${generated.sources}/java"
118                              package="org.apache.hadoop.hbase.generated.thrift"
119                              webxml="${build.webapps}/thrift/WEB-INF/web.xml"/>
120               </target>
121             </configuration>
122             <goals>
123               <goal>run</goal>
124             </goals>
125           </execution>
126         </executions>
127       </plugin>
128       <plugin>
129         <groupId>org.codehaus.mojo</groupId>
130         <artifactId>build-helper-maven-plugin</artifactId>
131         <executions>
132           <!-- Add the generated sources -->
133           <execution>
134             <id>jspcSource-packageInfo-source</id>
135             <phase>generate-sources</phase>
136             <goals>
137               <goal>add-source</goal>
138             </goals>
139             <configuration>
140               <sources>
141                 <source>${project.build.directory}/generated-sources/java</source>
142               </sources>
143             </configuration>
144           </execution>
145         </executions>
146       </plugin>
147       <!-- Make a jar and put the sources in the jar -->
148       <plugin>
149         <groupId>org.apache.maven.plugins</groupId>
150         <artifactId>maven-source-plugin</artifactId>
151       </plugin>
152     </plugins>
153     <pluginManagement>
154       <plugins>
155         <!--This plugin's configuration is used to store Eclipse m2e settings
156              only. It has no influence on the Maven build itself.-->
157         <plugin>
158           <groupId>org.eclipse.m2e</groupId>
159           <artifactId>lifecycle-mapping</artifactId>
160           <version>1.0.0</version>
161           <configuration>
162             <lifecycleMappingMetadata>
163               <pluginExecutions>
164                 <pluginExecution>
165                   <pluginExecutionFilter>
166                     <groupId>org.apache.maven.plugins</groupId>
167                     <artifactId>maven-antrun-plugin</artifactId>
168                     <versionRange>[1.6,)</versionRange>
169                     <goals>
170                       <goal>run</goal>
171                     </goals>
172                   </pluginExecutionFilter>
173                   <action>
174                     <ignore></ignore>
175                   </action>
176                 </pluginExecution>
177                 <pluginExecution>
178                   <pluginExecutionFilter>
179                     <groupId>org.apache.maven.plugins</groupId>
180                     <artifactId>maven-dependency-plugin</artifactId>
181                     <versionRange>[2.8,)</versionRange>
182                     <goals>
183                       <goal>build-classpath</goal>
184                     </goals>
185                   </pluginExecutionFilter>
186                   <action>
187                     <ignore></ignore>
188                   </action>
189                 </pluginExecution>
190                 <pluginExecution>
191                   <pluginExecutionFilter>
192                     <groupId>org.apache.maven.plugins</groupId>
193                     <artifactId>maven-compiler-plugin</artifactId>
194                     <versionRange>[3.2,)</versionRange>
195                     <goals>
196                       <goal>compile</goal>
197                     </goals>
198                   </pluginExecutionFilter>
199                   <action>
200                     <ignore></ignore>
201                   </action>
202                 </pluginExecution>
203               </pluginExecutions>
204             </lifecycleMappingMetadata>
205           </configuration>
206         </plugin>
207       </plugins>
208     </pluginManagement>
209   </build>
211   <dependencies>
212     <!-- Intra-project dependencies -->
213     <dependency>
214       <groupId>org.apache.hbase</groupId>
215       <artifactId>hbase-common</artifactId>
216       <type>jar</type>
217     </dependency>
218     <dependency>
219       <groupId>org.apache.hbase</groupId>
220       <artifactId>hbase-annotations</artifactId>
221       <type>test-jar</type>
222       <scope>test</scope>
223     </dependency>
224     <dependency>
225       <groupId>org.apache.hbase</groupId>
226       <artifactId>hbase-protocol</artifactId>
227     </dependency>
228     <dependency>
229       <groupId>org.apache.hbase</groupId>
230       <artifactId>hbase-client</artifactId>
231     </dependency>
232     <dependency>
233       <groupId>com.google.guava</groupId>
234       <artifactId>guava</artifactId>
235     </dependency>
236     <dependency>
237       <groupId>com.google.protobuf</groupId>
238       <artifactId>protobuf-java</artifactId>
239     </dependency>
240     <dependency>
241       <groupId>commons-logging</groupId>
242       <artifactId>commons-logging</artifactId>
243     </dependency>
244     <dependency>
245       <groupId>commons-net</groupId>
246       <artifactId>commons-net</artifactId>
247     </dependency>
248     <dependency>
249       <groupId>commons-cli</groupId>
250       <artifactId>commons-cli</artifactId>
251     </dependency>
252     <dependency>
253       <groupId>org.apache.commons</groupId>
254       <artifactId>commons-math</artifactId>
255     </dependency>
256     <dependency>
257       <groupId>commons-lang</groupId>
258       <artifactId>commons-lang</artifactId>
259     </dependency>
260     <dependency>
261       <groupId>org.apache.hbase</groupId>
262       <artifactId>hbase-server</artifactId>
263     </dependency>
264     <dependency>
265       <groupId>org.apache.hbase</groupId>
266       <artifactId>hbase-testing-util</artifactId>
267       <scope>test</scope>
268     </dependency>
269     <dependency>
270       <groupId>org.apache.hbase</groupId>
271       <artifactId>hbase-hadoop-compat</artifactId>
272     </dependency>
273     <dependency>
274       <groupId>org.apache.hbase</groupId>
275       <artifactId>${compat.module}</artifactId>
276       <version>${project.version}</version>
277     </dependency>
278     <dependency>
279       <groupId>org.apache.htrace</groupId>
280       <artifactId>htrace-core</artifactId>
281     </dependency>
282     <dependency>
283       <groupId>org.apache.thrift</groupId>
284       <artifactId>libthrift</artifactId>
285     </dependency>
286     <dependency>
287       <groupId>org.slf4j</groupId>
288       <artifactId>slf4j-api</artifactId>
289     </dependency>
290     <dependency>
291       <groupId>org.mortbay.jetty</groupId>
292       <artifactId>jetty</artifactId>
293     </dependency>
294     <dependency>
295       <groupId>org.mortbay.jetty</groupId>
296       <artifactId>jetty-sslengine</artifactId>
297     </dependency>
298     <dependency>
299       <groupId>org.mortbay.jetty</groupId>
300       <artifactId>jetty-util</artifactId>
301     </dependency>
302     <dependency>
303       <groupId>org.mortbay.jetty</groupId>
304       <artifactId>servlet-api-2.5</artifactId>
305     </dependency>
306     <dependency>
307       <groupId>org.mortbay.jetty</groupId>
308       <artifactId>jsp-api-2.1</artifactId>
309     </dependency>
310     <dependency>
311       <groupId>org.mortbay.jetty</groupId>
312       <artifactId>jsp-2.1</artifactId>
313       <scope>compile</scope>
314     </dependency>
315     <dependency>
316       <groupId>tomcat</groupId>
317       <artifactId>jasper-compiler</artifactId>
318       <scope>compile</scope>
319     </dependency>
320     <dependency>
321       <groupId>tomcat</groupId>
322       <artifactId>jasper-runtime</artifactId>
323     </dependency>
324   </dependencies>
326   <profiles>
327     <!-- Skip the tests in this module -->
328     <profile>
329       <id>skipThriftTests</id>
330       <activation>
331         <property>
332           <name>skipThriftTests</name>
333         </property>
334       </activation>
335       <properties>
336         <surefire.skipFirstPart>true</surefire.skipFirstPart>
337         <surefire.skipSecondPart>true</surefire.skipSecondPart>
338       </properties>
339     </profile>
341     <!--
342       Profile for regenerating the thrift java classes.
343       The generated files are to be committed to version control.
344       Activate using:
345        mvn compile -Pcompile-thrift
346     -->
347     <profile>
348       <id>compile-thrift</id>
349       <build>
350         <plugins>
351           <plugin>
352             <groupId>org.apache.maven.plugins</groupId>
353             <artifactId>maven-enforcer-plugin</artifactId>
354             <version>1.3.1</version>
355             <executions>
356               <execution>
357                 <id>enforce-thrift-version</id>
358                 <goals>
359                   <goal>enforce</goal>
360                 </goals>
361                 <configuration>
362                   <rules>
363                     <requireProperty>
364                       <property>thrift.version</property>
365                       <message>"The Thrift version must be specified."</message>
366                       <regex>0\.9\.0</regex>
367                       <regexMessage>
370 [FATAL] ==========================================================================================
371 [FATAL] HBase Thrift requires the thrift generator version 0.9.0.
372 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
373 [FATAL] ==========================================================================================
376                       </regexMessage>
377                     </requireProperty>
378                   </rules>
379                   <fail>true</fail>
380                 </configuration>
381               </execution>
382             </executions>
383           </plugin>
384           <plugin>
385             <groupId>org.codehaus.mojo</groupId>
386             <artifactId>exec-maven-plugin</artifactId>
387             <version>1.2.1</version>
388             <executions>
389               <execution>
390                 <id>check-thrift-version</id>
391                 <phase>generate-sources</phase>
392                 <goals>
393                   <goal>exec</goal>
394                 </goals>
395                 <configuration>
396                   <executable>sh</executable>
397                   <workingDirectory>${basedir}</workingDirectory>
398                   <arguments>
399                     <argument>-c</argument>
400                     <argument>${thrift.path} -version | \
401                       fgrep 'Thrift version ${thrift.version}' &amp;&amp; exit 0;
402                       echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
403                       exit 1</argument>
404                   </arguments>
405                 </configuration>
406               </execution>
407               <execution>
408                 <id>thrift</id>
409                 <phase>generate-sources</phase>
410                 <goals>
411                   <goal>exec</goal>
412                 </goals>
413                 <configuration>
414                   <executable>${thrift.path}</executable>
415                   <workingDirectory>${basedir}</workingDirectory>
416                   <arguments>
417                     <argument>-strict</argument>
418                     <argument>--gen</argument>
419                     <argument>java:hashcode</argument>
420                     <argument>-out</argument>
421                     <argument>${basedir}/src/main/java</argument>
422                     <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
423                   </arguments>
424                 </configuration>
425               </execution>
426               <execution>
427                 <id>thrift2</id>
428                 <phase>generate-sources</phase>
429                 <goals>
430                   <goal>exec</goal>
431                 </goals>
432                 <configuration>
433                   <executable>${thrift.path}</executable>
434                   <workingDirectory>${basedir}</workingDirectory>
435                   <arguments>
436                     <argument>-strict</argument>
437                     <argument>--gen</argument>
438                     <argument>java:hashcode</argument>
439                     <argument>-out</argument>
440                     <argument>${basedir}/src/main/java</argument>
441                     <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
442                   </arguments>
443                 </configuration>
444               </execution>
445             </executions>
446           </plugin>
447         </plugins>
448       </build>
449     </profile>
451     <!-- profile against Hadoop 1.1.x: This is the default. It has to have the same
452 activation property as the parent Hadoop 1.1.x profile to make sure it gets run at
453 the same time. -->
454     <profile>
455       <id>hadoop-1.1</id>
456       <activation>
457         <property>
458           <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
459           <!--h1-->
460           <name>hadoop.profile</name>
461           <value>1.1</value>
462         </property>
463       </activation>
464       <dependencies>
465         <dependency>
466           <groupId>org.apache.hadoop</groupId>
467           <artifactId>hadoop-core</artifactId>
468         </dependency>
469         <dependency>
470           <groupId>org.apache.hadoop</groupId>
471           <artifactId>hadoop-test</artifactId>
472         </dependency>
473       </dependencies>
474     </profile>
475     <profile>
476       <id>hadoop-1.0</id>
477       <activation>
478         <property>
479           <name>hadoop.profile</name>
480           <value>1.0</value>
481         </property>
482       </activation>
483       <dependencies>
484         <dependency>
485           <groupId>org.apache.hadoop</groupId>
486           <artifactId>hadoop-core</artifactId>
487         </dependency>
488         <dependency>
489           <groupId>org.apache.hadoop</groupId>
490           <artifactId>hadoop-test</artifactId>
491         </dependency>
492       </dependencies>
493     </profile>
495     <!--
496       profile for building against Hadoop 2.0.0-alpha. Activate using:
497        mvn -Dhadoop.profile=2.0
498     -->
499     <profile>
500       <id>hadoop-2.0</id>
501       <activation>
502         <property>
503           <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
504           <!--h2-->
505           <name>!hadoop.profile</name>
506         </property>
507       </activation>
508       <dependencies>
509         <dependency>
510           <groupId>org.apache.hadoop</groupId>
511           <artifactId>hadoop-client</artifactId>
512         </dependency>
513         <dependency>
514           <groupId>org.apache.hadoop</groupId>
515           <artifactId>hadoop-mapreduce-client-core</artifactId>
516         </dependency>
517         <dependency>
518           <groupId>org.apache.hadoop</groupId>
519           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
520           <type>test-jar</type>
521           <scope>test</scope>
522         </dependency>
523         <dependency>
524           <groupId>org.apache.hadoop</groupId>
525           <artifactId>hadoop-common</artifactId>
526         </dependency>
527         <dependency>
528           <groupId>org.apache.hadoop</groupId>
529           <artifactId>hadoop-minicluster</artifactId>
530           <scope>test</scope>
531         </dependency>
532       </dependencies>
533       <build>
534         <plugins>
535           <plugin>
536             <artifactId>maven-dependency-plugin</artifactId>
537             <executions>
538               <execution>
539                 <id>create-mrapp-generated-classpath</id>
540                 <phase>generate-test-resources</phase>
541                 <goals>
542                   <goal>build-classpath</goal>
543                 </goals>
544                 <configuration>
545                   <!-- needed to run the unit test for DS to generate
546                   the required classpath that is required in the env
547                   of the launch container in the mini mr/yarn cluster
548                   -->
549                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
550                   </outputFile>
551                 </configuration>
552               </execution>
553             </executions>
554           </plugin>
555         </plugins>
556       </build>
557     </profile>
559     <!--
560       profile for building against Hadoop 3.0.x. Activate using:
561        mvn -Dhadoop.profile=3.0
562     -->
563     <profile>
564       <id>hadoop-3.0</id>
565       <activation>
566         <property>
567           <name>hadoop.profile</name>
568           <value>3.0</value>
569         </property>
570       </activation>
571       <properties>
572         <hadoop.version>3.0-SNAPSHOT</hadoop.version>
573       </properties>
574       <dependencies>
575         <dependency>
576           <groupId>org.apache.hadoop</groupId>
577           <artifactId>hadoop-common</artifactId>
578         </dependency>
579         <dependency>
580           <groupId>org.apache.hadoop</groupId>
581           <artifactId>hadoop-minicluster</artifactId>
582         </dependency>
583       </dependencies>
584       <build>
585         <plugins>
586           <plugin>
587             <artifactId>maven-dependency-plugin</artifactId>
588             <executions>
589               <execution>
590                 <id>create-mrapp-generated-classpath</id>
591                 <phase>generate-test-resources</phase>
592                 <goals>
593                   <goal>build-classpath</goal>
594                 </goals>
595                 <configuration>
596                   <!-- needed to run the unit test for DS to generate
597                   the required classpath that is required in the env
598                   of the launch container in the mini mr/yarn cluster
599                   -->
600                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
601                   </outputFile>
602                 </configuration>
603               </execution>
604             </executions>
605           </plugin>
606         </plugins>
607       </build>
608     </profile>
609   </profiles>
610 </project>