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">
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
15 * http://www.apache.org/licenses/LICENSE-2.0
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.
24 <modelVersion>4.0.0</modelVersion>
26 <artifactId>hbase</artifactId>
27 <groupId>org.apache.hbase</groupId>
28 <version>2.0.0-SNAPSHOT</version>
29 <relativePath>..</relativePath>
31 <artifactId>hbase-thrift</artifactId>
32 <name>HBase - Thrift</name>
33 <description>HBase Thrift Server</description>
36 <!-- Makes sure the resources get added before they are processed
37 by placing this first -->
39 <!-- Add the build webabpps to the classpth -->
41 <directory>${project.build.directory}</directory>
43 <include>hbase-webapps/**</include>
50 <groupId>org.apache.maven.plugins</groupId>
51 <artifactId>maven-site-plugin</artifactId>
57 <!--Make it so assembly:single does nothing in here-->
58 <artifactId>maven-assembly-plugin</artifactId>
59 <version>${maven.assembly.version}</version>
61 <skipAssembly>true</skipAssembly>
65 <artifactId>maven-surefire-plugin</artifactId>
66 <!-- Always skip the second part executions, since we only run
67 simple unit tests in this module -->
70 <id>secondPartTestsExecution</id>
80 <value>org.apache.hadoop.hbase.ServerResourceCheckerJUnitListener</value>
83 <systemPropertyVariables>
84 <test.build.webapps>target/test-classes/webapps</test.build.webapps>
85 </systemPropertyVariables>
90 <!-- General ant tasks, bound to different build phases -->
92 <artifactId>maven-antrun-plugin</artifactId>
94 <!-- Generate web app sources -->
97 <phase>generate-sources</phase>
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="**/*~"/>
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"/>
129 <groupId>org.codehaus.mojo</groupId>
130 <artifactId>build-helper-maven-plugin</artifactId>
132 <!-- Add the generated sources -->
134 <id>jspcSource-packageInfo-source</id>
135 <phase>generate-sources</phase>
137 <goal>add-source</goal>
141 <source>${project.build.directory}/generated-sources/java</source>
147 <!-- Make a jar and put the sources in the jar -->
149 <groupId>org.apache.maven.plugins</groupId>
150 <artifactId>maven-source-plugin</artifactId>
155 <!--This plugin's configuration is used to store Eclipse m2e settings
156 only. It has no influence on the Maven build itself.-->
158 <groupId>org.eclipse.m2e</groupId>
159 <artifactId>lifecycle-mapping</artifactId>
160 <version>1.0.0</version>
162 <lifecycleMappingMetadata>
165 <pluginExecutionFilter>
166 <groupId>org.apache.maven.plugins</groupId>
167 <artifactId>maven-antrun-plugin</artifactId>
168 <versionRange>[1.6,)</versionRange>
172 </pluginExecutionFilter>
178 <pluginExecutionFilter>
179 <groupId>org.apache.maven.plugins</groupId>
180 <artifactId>maven-dependency-plugin</artifactId>
181 <versionRange>[2.8,)</versionRange>
183 <goal>build-classpath</goal>
185 </pluginExecutionFilter>
191 <pluginExecutionFilter>
192 <groupId>org.apache.maven.plugins</groupId>
193 <artifactId>maven-compiler-plugin</artifactId>
194 <versionRange>[3.2,)</versionRange>
198 </pluginExecutionFilter>
204 </lifecycleMappingMetadata>
212 <!-- Intra-project dependencies -->
214 <groupId>org.apache.hbase</groupId>
215 <artifactId>hbase-common</artifactId>
219 <groupId>org.apache.hbase</groupId>
220 <artifactId>hbase-annotations</artifactId>
221 <type>test-jar</type>
225 <groupId>org.apache.hbase</groupId>
226 <artifactId>hbase-protocol</artifactId>
229 <groupId>org.apache.hbase</groupId>
230 <artifactId>hbase-client</artifactId>
233 <groupId>com.google.guava</groupId>
234 <artifactId>guava</artifactId>
237 <groupId>com.google.protobuf</groupId>
238 <artifactId>protobuf-java</artifactId>
241 <groupId>commons-logging</groupId>
242 <artifactId>commons-logging</artifactId>
245 <groupId>commons-net</groupId>
246 <artifactId>commons-net</artifactId>
249 <groupId>commons-cli</groupId>
250 <artifactId>commons-cli</artifactId>
253 <groupId>org.apache.commons</groupId>
254 <artifactId>commons-math</artifactId>
257 <groupId>commons-lang</groupId>
258 <artifactId>commons-lang</artifactId>
261 <groupId>org.apache.hbase</groupId>
262 <artifactId>hbase-server</artifactId>
265 <groupId>org.apache.hbase</groupId>
266 <artifactId>hbase-testing-util</artifactId>
270 <groupId>org.apache.hbase</groupId>
271 <artifactId>hbase-hadoop-compat</artifactId>
274 <groupId>org.apache.hbase</groupId>
275 <artifactId>${compat.module}</artifactId>
276 <version>${project.version}</version>
279 <groupId>org.apache.htrace</groupId>
280 <artifactId>htrace-core</artifactId>
283 <groupId>org.apache.thrift</groupId>
284 <artifactId>libthrift</artifactId>
287 <groupId>org.slf4j</groupId>
288 <artifactId>slf4j-api</artifactId>
291 <groupId>org.mortbay.jetty</groupId>
292 <artifactId>jetty</artifactId>
295 <groupId>org.mortbay.jetty</groupId>
296 <artifactId>jetty-sslengine</artifactId>
299 <groupId>org.mortbay.jetty</groupId>
300 <artifactId>jetty-util</artifactId>
303 <groupId>org.mortbay.jetty</groupId>
304 <artifactId>servlet-api-2.5</artifactId>
307 <groupId>org.mortbay.jetty</groupId>
308 <artifactId>jsp-api-2.1</artifactId>
311 <groupId>org.mortbay.jetty</groupId>
312 <artifactId>jsp-2.1</artifactId>
313 <scope>compile</scope>
316 <groupId>tomcat</groupId>
317 <artifactId>jasper-compiler</artifactId>
318 <scope>compile</scope>
321 <groupId>tomcat</groupId>
322 <artifactId>jasper-runtime</artifactId>
327 <!-- Skip the tests in this module -->
329 <id>skipThriftTests</id>
332 <name>skipThriftTests</name>
336 <surefire.skipFirstPart>true</surefire.skipFirstPart>
337 <surefire.skipSecondPart>true</surefire.skipSecondPart>
342 Profile for regenerating the thrift java classes.
343 The generated files are to be committed to version control.
345 mvn compile -Pcompile-thrift
348 <id>compile-thrift</id>
352 <groupId>org.apache.maven.plugins</groupId>
353 <artifactId>maven-enforcer-plugin</artifactId>
354 <version>1.3.1</version>
357 <id>enforce-thrift-version</id>
364 <property>thrift.version</property>
365 <message>"The Thrift version must be specified."</message>
366 <regex>0\.9\.0</regex>
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] ==========================================================================================
385 <groupId>org.codehaus.mojo</groupId>
386 <artifactId>exec-maven-plugin</artifactId>
387 <version>1.2.1</version>
390 <id>check-thrift-version</id>
391 <phase>generate-sources</phase>
396 <executable>sh</executable>
397 <workingDirectory>${basedir}</workingDirectory>
399 <argument>-c</argument>
400 <argument>${thrift.path} -version | \
401 fgrep 'Thrift version ${thrift.version}' && exit 0;
402 echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
409 <phase>generate-sources</phase>
414 <executable>${thrift.path}</executable>
415 <workingDirectory>${basedir}</workingDirectory>
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>
428 <phase>generate-sources</phase>
433 <executable>${thrift.path}</executable>
434 <workingDirectory>${basedir}</workingDirectory>
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>
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
458 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
460 <name>hadoop.profile</name>
466 <groupId>org.apache.hadoop</groupId>
467 <artifactId>hadoop-core</artifactId>
470 <groupId>org.apache.hadoop</groupId>
471 <artifactId>hadoop-test</artifactId>
479 <name>hadoop.profile</name>
485 <groupId>org.apache.hadoop</groupId>
486 <artifactId>hadoop-core</artifactId>
489 <groupId>org.apache.hadoop</groupId>
490 <artifactId>hadoop-test</artifactId>
496 profile for building against Hadoop 2.0.0-alpha. Activate using:
497 mvn -Dhadoop.profile=2.0
503 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
505 <name>!hadoop.profile</name>
510 <groupId>org.apache.hadoop</groupId>
511 <artifactId>hadoop-client</artifactId>
514 <groupId>org.apache.hadoop</groupId>
515 <artifactId>hadoop-mapreduce-client-core</artifactId>
518 <groupId>org.apache.hadoop</groupId>
519 <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
520 <type>test-jar</type>
524 <groupId>org.apache.hadoop</groupId>
525 <artifactId>hadoop-common</artifactId>
528 <groupId>org.apache.hadoop</groupId>
529 <artifactId>hadoop-minicluster</artifactId>
536 <artifactId>maven-dependency-plugin</artifactId>
539 <id>create-mrapp-generated-classpath</id>
540 <phase>generate-test-resources</phase>
542 <goal>build-classpath</goal>
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
549 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
560 profile for building against Hadoop 3.0.x. Activate using:
561 mvn -Dhadoop.profile=3.0
567 <name>hadoop.profile</name>
572 <hadoop.version>3.0-SNAPSHOT</hadoop.version>
576 <groupId>org.apache.hadoop</groupId>
577 <artifactId>hadoop-common</artifactId>
580 <groupId>org.apache.hadoop</groupId>
581 <artifactId>hadoop-minicluster</artifactId>
587 <artifactId>maven-dependency-plugin</artifactId>
590 <id>create-mrapp-generated-classpath</id>
591 <phase>generate-test-resources</phase>
593 <goal>build-classpath</goal>
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
600 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath