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">
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-build-configuration</artifactId>
27 <groupId>org.apache.hbase</groupId>
28 <version>2.4.9-SNAPSHOT</version>
29 <relativePath>../hbase-build-configuration</relativePath>
31 <artifactId>hbase-thrift</artifactId>
32 <name>Apache 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>
47 <directory>src/main/resources/</directory>
49 <include>**/*.thrift</include>
55 <directory>src/test/resources/META-INF/</directory>
56 <targetPath>META-INF/</targetPath>
58 <include>LICENSE</include>
59 <include>NOTICE</include>
61 <filtering>true</filtering>
64 <directory>src/test/resources</directory>
66 <include>**/**</include>
73 <!--Make it so assembly:single does nothing in here-->
74 <artifactId>maven-assembly-plugin</artifactId>
76 <skipAssembly>true</skipAssembly>
79 <!-- General ant tasks, bound to different build phases -->
81 <artifactId>maven-antrun-plugin</artifactId>
83 <!-- Generate web app sources -->
86 <phase>generate-sources</phase>
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="**/*~"/>
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"/>
118 <groupId>org.codehaus.mojo</groupId>
119 <artifactId>build-helper-maven-plugin</artifactId>
121 <!-- Add the generated sources -->
123 <id>jspcSource-packageInfo-source</id>
124 <phase>generate-sources</phase>
126 <goal>add-source</goal>
130 <source>${project.build.directory}/generated-sources/java</source>
136 <!-- Make a jar and put the sources in the jar -->
138 <groupId>org.apache.maven.plugins</groupId>
139 <artifactId>maven-source-plugin</artifactId>
142 <groupId>net.revelc.code</groupId>
143 <artifactId>warbucks-maven-plugin</artifactId>
149 <!-- Intra-project dependencies -->
151 <groupId>org.apache.hbase</groupId>
152 <artifactId>hbase-logging</artifactId>
153 <type>test-jar</type>
157 <groupId>org.apache.hbase</groupId>
158 <artifactId>hbase-common</artifactId>
162 <groupId>org.apache.hbase</groupId>
163 <artifactId>hbase-annotations</artifactId>
164 <type>test-jar</type>
168 <groupId>org.apache.hbase</groupId>
169 <artifactId>hbase-protocol</artifactId>
172 <groupId>org.apache.hbase</groupId>
173 <artifactId>hbase-client</artifactId>
176 <groupId>org.apache.hbase.thirdparty</groupId>
177 <artifactId>hbase-shaded-miscellaneous</artifactId>
180 <groupId>org.slf4j</groupId>
181 <artifactId>slf4j-api</artifactId>
184 <groupId>org.apache.commons</groupId>
185 <artifactId>commons-lang3</artifactId>
188 <groupId>org.apache.hbase</groupId>
189 <artifactId>hbase-server</artifactId>
192 <groupId>org.apache.hbase</groupId>
193 <artifactId>hbase-asyncfs</artifactId>
194 <type>test-jar</type>
198 <groupId>org.apache.hbase</groupId>
199 <artifactId>hbase-testing-util</artifactId>
203 <groupId>org.apache.hbase</groupId>
204 <artifactId>hbase-hadoop-compat</artifactId>
207 <groupId>org.apache.hbase</groupId>
208 <artifactId>${compat.module}</artifactId>
209 <version>${project.version}</version>
212 <groupId>org.apache.thrift</groupId>
213 <artifactId>libthrift</artifactId>
216 <groupId>junit</groupId>
217 <artifactId>junit</artifactId>
221 <groupId>javax.servlet</groupId>
222 <artifactId>javax.servlet-api</artifactId>
225 <groupId>com.github.stephenc.findbugs</groupId>
226 <artifactId>findbugs-annotations</artifactId>
227 <scope>compile</scope>
228 <optional>true</optional>
231 <!--For JspC used in ant task-->
232 <groupId>org.glassfish.web</groupId>
233 <artifactId>javax.servlet.jsp</artifactId>
235 <!-- Specifically needed for jetty-jsp, included
236 to bypass version scanning that hits a bad repo
239 <groupId>org.glassfish</groupId>
240 <artifactId>javax.el</artifactId>
243 <groupId>org.apache.kerby</groupId>
244 <artifactId>kerb-simplekdc</artifactId>
248 <groupId>org.slf4j</groupId>
249 <artifactId>jcl-over-slf4j</artifactId>
253 <groupId>org.slf4j</groupId>
254 <artifactId>jul-to-slf4j</artifactId>
258 <groupId>org.slf4j</groupId>
259 <artifactId>slf4j-log4j12</artifactId>
263 <groupId>log4j</groupId>
264 <artifactId>log4j</artifactId>
270 <!-- Needs to make the profile in apache parent pom -->
272 <id>apache-release</id>
276 <groupId>org.apache.maven.plugins</groupId>
277 <artifactId>maven-resources-plugin</artifactId>
280 <id>license-javadocs</id>
281 <phase>prepare-package</phase>
283 <goal>copy-resources</goal>
286 <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
289 <directory>src/main/javadoc/META-INF/</directory>
290 <targetPath>META-INF/</targetPath>
292 <include>LICENSE</include>
293 <include>NOTICE</include>
295 <filtering>true</filtering>
305 <!-- Skip the tests in this module -->
307 <id>skipThriftTests</id>
310 <name>skipThriftTests</name>
314 <surefire.skipFirstPart>true</surefire.skipFirstPart>
315 <surefire.skipSecondPart>true</surefire.skipSecondPart>
320 Profile for regenerating the thrift java classes.
321 The generated files are to be committed to version control.
323 mvn compile -Pcompile-thrift
326 <id>compile-thrift</id>
330 <groupId>org.apache.maven.plugins</groupId>
331 <artifactId>maven-enforcer-plugin</artifactId>
334 <id>enforce-thrift-version</id>
341 <property>thrift.version</property>
342 <message>"The Thrift version must be specified."</message>
343 <regex>0\.14\.1</regex>
347 [FATAL] ==========================================================================================
348 [FATAL] HBase Thrift requires the thrift generator version 0.14.1.
349 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
350 [FATAL] ==========================================================================================
362 <groupId>org.codehaus.mojo</groupId>
363 <artifactId>exec-maven-plugin</artifactId>
364 <version>${exec.maven.version}</version>
367 <id>check-thrift-version</id>
368 <phase>generate-sources</phase>
373 <executable>sh</executable>
374 <workingDirectory>${basedir}</workingDirectory>
376 <argument>-c</argument>
377 <argument>${thrift.path} -version | \
378 fgrep 'Thrift version ${thrift.version}' && exit 0;
379 echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
386 <phase>generate-sources</phase>
391 <executable>${thrift.path}</executable>
392 <workingDirectory>${basedir}</workingDirectory>
394 <argument>-strict</argument>
395 <argument>--gen</argument>
396 <argument>java</argument>
397 <argument>-out</argument>
398 <argument>${basedir}/src/main/java</argument>
399 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
405 <phase>generate-sources</phase>
410 <executable>${thrift.path}</executable>
411 <workingDirectory>${basedir}</workingDirectory>
413 <argument>-strict</argument>
414 <argument>--gen</argument>
415 <argument>java</argument>
416 <argument>-out</argument>
417 <argument>${basedir}/src/main/java</argument>
418 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
428 <!-- profile against Hadoop 2.x: This is the default -->
433 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
435 <name>!hadoop.profile</name>
440 <groupId>org.apache.hadoop</groupId>
441 <artifactId>hadoop-client</artifactId>
444 <groupId>com.google.guava</groupId>
445 <artifactId>guava</artifactId>
448 <groupId>javax.xml.bind</groupId>
449 <artifactId>jaxb-api</artifactId>
454 <groupId>org.apache.hadoop</groupId>
455 <artifactId>hadoop-mapreduce-client-core</artifactId>
458 <groupId>com.google.guava</groupId>
459 <artifactId>guava</artifactId>
462 <groupId>javax.xml.bind</groupId>
463 <artifactId>jaxb-api</artifactId>
468 <groupId>org.apache.hadoop</groupId>
469 <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
470 <type>test-jar</type>
474 <groupId>com.google.guava</groupId>
475 <artifactId>guava</artifactId>
480 <groupId>org.apache.hadoop</groupId>
481 <artifactId>hadoop-common</artifactId>
484 <groupId>org.apache.hadoop</groupId>
485 <artifactId>hadoop-minicluster</artifactId>
489 <groupId>com.google.guava</groupId>
490 <artifactId>guava</artifactId>
493 <groupId>org.apache.zookeeper</groupId>
494 <artifactId>zookeeper</artifactId>
497 <groupId>javax.xml.bind</groupId>
498 <artifactId>jaxb-api</artifactId>
506 <artifactId>maven-dependency-plugin</artifactId>
509 <id>create-mrapp-generated-classpath</id>
510 <phase>generate-test-resources</phase>
512 <goal>build-classpath</goal>
515 <!-- needed to run the unit test for DS to generate
516 the required classpath that is required in the env
517 of the launch container in the mini mr/yarn cluster
519 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
530 profile for building against Hadoop 3.0.x. Activate using:
531 mvn -Dhadoop.profile=3.0
537 <name>hadoop.profile</name>
543 <groupId>org.apache.hadoop</groupId>
544 <artifactId>hadoop-common</artifactId>
547 <groupId>org.apache.hadoop</groupId>
548 <artifactId>hadoop-minicluster</artifactId>
551 <groupId>com.google.guava</groupId>
552 <artifactId>guava</artifactId>
555 <groupId>javax.xml.bind</groupId>
556 <artifactId>jaxb-api</artifactId>
559 <groupId>javax.ws.rs</groupId>
560 <artifactId>jsr311-api</artifactId>
568 <artifactId>maven-dependency-plugin</artifactId>
571 <id>create-mrapp-generated-classpath</id>
572 <phase>generate-test-resources</phase>
574 <goal>build-classpath</goal>
577 <!-- needed to run the unit test for DS to generate
578 the required classpath that is required in the env
579 of the launch container in the mini mr/yarn cluster
581 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
591 <id>eclipse-specific</id>
594 <name>m2e.version</name>
600 <!--This plugin's configuration is used to store Eclipse m2e settings
601 only. It has no influence on the Maven build itself.-->
603 <groupId>org.eclipse.m2e</groupId>
604 <artifactId>lifecycle-mapping</artifactId>
606 <lifecycleMappingMetadata>
609 <pluginExecutionFilter>
610 <groupId>org.apache.maven.plugins</groupId>
611 <artifactId>maven-antrun-plugin</artifactId>
612 <versionRange>[1.6,)</versionRange>
616 </pluginExecutionFilter>
622 <pluginExecutionFilter>
623 <groupId>org.apache.maven.plugins</groupId>
624 <artifactId>maven-dependency-plugin</artifactId>
625 <versionRange>[2.8,)</versionRange>
627 <goal>build-classpath</goal>
629 </pluginExecutionFilter>
635 </lifecycleMappingMetadata>