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>3.0.0-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>org.apache.maven.plugins</groupId>
143 <artifactId>maven-checkstyle-plugin</artifactId>
145 <failOnViolation>true</failOnViolation>
149 <groupId>net.revelc.code</groupId>
150 <artifactId>warbucks-maven-plugin</artifactId>
156 <!-- Intra-project dependencies -->
158 <groupId>org.apache.hbase</groupId>
159 <artifactId>hbase-common</artifactId>
163 <groupId>org.apache.hbase</groupId>
164 <artifactId>hbase-annotations</artifactId>
165 <type>test-jar</type>
169 <groupId>org.apache.hbase</groupId>
170 <artifactId>hbase-protocol</artifactId>
173 <groupId>org.apache.hbase</groupId>
174 <artifactId>hbase-client</artifactId>
177 <groupId>org.apache.hbase.thirdparty</groupId>
178 <artifactId>hbase-shaded-miscellaneous</artifactId>
181 <groupId>org.slf4j</groupId>
182 <artifactId>slf4j-api</artifactId>
185 <groupId>org.apache.commons</groupId>
186 <artifactId>commons-lang3</artifactId>
189 <groupId>org.apache.hbase</groupId>
190 <artifactId>hbase-server</artifactId>
193 <groupId>org.apache.hbase</groupId>
194 <artifactId>hbase-testing-util</artifactId>
198 <groupId>org.apache.hbase</groupId>
199 <artifactId>hbase-hadoop-compat</artifactId>
202 <groupId>org.apache.hbase</groupId>
203 <artifactId>${compat.module}</artifactId>
204 <version>${project.version}</version>
207 <groupId>org.apache.thrift</groupId>
208 <artifactId>libthrift</artifactId>
211 <groupId>org.eclipse.jetty</groupId>
212 <artifactId>jetty-server</artifactId>
215 <groupId>org.eclipse.jetty</groupId>
216 <artifactId>jetty-servlet</artifactId>
219 <groupId>junit</groupId>
220 <artifactId>junit</artifactId>
224 <groupId>org.eclipse.jetty</groupId>
225 <artifactId>jetty-http</artifactId>
228 <groupId>javax.servlet</groupId>
229 <artifactId>javax.servlet-api</artifactId>
232 <groupId>org.eclipse.jetty</groupId>
233 <artifactId>jetty-util</artifactId>
236 <groupId>com.github.stephenc.findbugs</groupId>
237 <artifactId>findbugs-annotations</artifactId>
238 <scope>compile</scope>
239 <optional>true</optional>
242 <!--For JspC used in ant task-->
243 <groupId>org.glassfish.web</groupId>
244 <artifactId>javax.servlet.jsp</artifactId>
246 <!-- Specifically needed for jetty-jsp, included
247 to bypass version scanning that hits a bad repo
250 <groupId>org.glassfish</groupId>
251 <artifactId>javax.el</artifactId>
254 <groupId>org.apache.kerby</groupId>
255 <artifactId>kerb-simplekdc</artifactId>
261 <!-- Needs to make the profile in apache parent pom -->
263 <id>apache-release</id>
267 <groupId>org.apache.maven.plugins</groupId>
268 <artifactId>maven-resources-plugin</artifactId>
271 <id>license-javadocs</id>
272 <phase>prepare-package</phase>
274 <goal>copy-resources</goal>
277 <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
280 <directory>src/main/javadoc/META-INF/</directory>
281 <targetPath>META-INF/</targetPath>
283 <include>LICENSE</include>
284 <include>NOTICE</include>
286 <filtering>true</filtering>
296 <!-- Skip the tests in this module -->
298 <id>skipThriftTests</id>
301 <name>skipThriftTests</name>
305 <surefire.skipFirstPart>true</surefire.skipFirstPart>
306 <surefire.skipSecondPart>true</surefire.skipSecondPart>
311 Profile for regenerating the thrift java classes.
312 The generated files are to be committed to version control.
314 mvn compile -Pcompile-thrift
317 <id>compile-thrift</id>
321 <groupId>org.apache.maven.plugins</groupId>
322 <artifactId>maven-enforcer-plugin</artifactId>
325 <id>enforce-thrift-version</id>
332 <property>thrift.version</property>
333 <message>"The Thrift version must be specified."</message>
334 <regex>0\.12\.0</regex>
338 [FATAL] ==========================================================================================
339 [FATAL] HBase Thrift requires the thrift generator version 0.12.0.
340 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
341 [FATAL] ==========================================================================================
353 <groupId>org.codehaus.mojo</groupId>
354 <artifactId>exec-maven-plugin</artifactId>
355 <version>${exec.maven.version}</version>
358 <id>check-thrift-version</id>
359 <phase>generate-sources</phase>
364 <executable>sh</executable>
365 <workingDirectory>${basedir}</workingDirectory>
367 <argument>-c</argument>
368 <argument>${thrift.path} -version | \
369 fgrep 'Thrift version ${thrift.version}' && exit 0;
370 echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
377 <phase>generate-sources</phase>
382 <executable>${thrift.path}</executable>
383 <workingDirectory>${basedir}</workingDirectory>
385 <argument>-strict</argument>
386 <argument>--gen</argument>
387 <argument>java</argument>
388 <argument>-out</argument>
389 <argument>${basedir}/src/main/java</argument>
390 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
396 <phase>generate-sources</phase>
401 <executable>${thrift.path}</executable>
402 <workingDirectory>${basedir}</workingDirectory>
404 <argument>-strict</argument>
405 <argument>--gen</argument>
406 <argument>java</argument>
407 <argument>-out</argument>
408 <argument>${basedir}/src/main/java</argument>
409 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
419 <!-- profile against Hadoop 2.x: This is the default -->
424 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
426 <name>!hadoop.profile</name>
431 <groupId>org.apache.hadoop</groupId>
432 <artifactId>hadoop-client</artifactId>
435 <groupId>com.google.guava</groupId>
436 <artifactId>guava</artifactId>
441 <groupId>org.apache.hadoop</groupId>
442 <artifactId>hadoop-mapreduce-client-core</artifactId>
445 <groupId>com.google.guava</groupId>
446 <artifactId>guava</artifactId>
451 <groupId>org.apache.hadoop</groupId>
452 <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
453 <type>test-jar</type>
457 <groupId>com.google.guava</groupId>
458 <artifactId>guava</artifactId>
463 <groupId>org.apache.hadoop</groupId>
464 <artifactId>hadoop-common</artifactId>
467 <groupId>org.apache.hadoop</groupId>
468 <artifactId>hadoop-minicluster</artifactId>
472 <groupId>com.google.guava</groupId>
473 <artifactId>guava</artifactId>
476 <groupId>org.apache.zookeeper</groupId>
477 <artifactId>zookeeper</artifactId>
485 <artifactId>maven-dependency-plugin</artifactId>
488 <id>create-mrapp-generated-classpath</id>
489 <phase>generate-test-resources</phase>
491 <goal>build-classpath</goal>
494 <!-- needed to run the unit test for DS to generate
495 the required classpath that is required in the env
496 of the launch container in the mini mr/yarn cluster
498 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
509 profile for building against Hadoop 3.0.x. Activate using:
510 mvn -Dhadoop.profile=3.0
516 <name>hadoop.profile</name>
522 <groupId>org.apache.hadoop</groupId>
523 <artifactId>hadoop-common</artifactId>
526 <groupId>org.apache.hadoop</groupId>
527 <artifactId>hadoop-minicluster</artifactId>
533 <artifactId>maven-dependency-plugin</artifactId>
536 <id>create-mrapp-generated-classpath</id>
537 <phase>generate-test-resources</phase>
539 <goal>build-classpath</goal>
542 <!-- needed to run the unit test for DS to generate
543 the required classpath that is required in the env
544 of the launch container in the mini mr/yarn cluster
546 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
556 <id>eclipse-specific</id>
559 <name>m2e.version</name>
565 <!--This plugin's configuration is used to store Eclipse m2e settings
566 only. It has no influence on the Maven build itself.-->
568 <groupId>org.eclipse.m2e</groupId>
569 <artifactId>lifecycle-mapping</artifactId>
571 <lifecycleMappingMetadata>
574 <pluginExecutionFilter>
575 <groupId>org.apache.maven.plugins</groupId>
576 <artifactId>maven-antrun-plugin</artifactId>
577 <versionRange>[1.6,)</versionRange>
581 </pluginExecutionFilter>
587 <pluginExecutionFilter>
588 <groupId>org.apache.maven.plugins</groupId>
589 <artifactId>maven-dependency-plugin</artifactId>
590 <versionRange>[2.8,)</versionRange>
592 <goal>build-classpath</goal>
594 </pluginExecutionFilter>
600 </lifecycleMappingMetadata>