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 <!--For JspC used in ant task-->
237 <groupId>org.glassfish.web</groupId>
238 <artifactId>javax.servlet.jsp</artifactId>
240 <!-- Specifically needed for jetty-jsp, included
241 to bypass version scanning that hits a bad repo
244 <groupId>org.glassfish</groupId>
245 <artifactId>javax.el</artifactId>
248 <groupId>org.apache.kerby</groupId>
249 <artifactId>kerb-simplekdc</artifactId>
255 <!-- Needs to make the profile in apache parent pom -->
257 <id>apache-release</id>
261 <groupId>org.apache.maven.plugins</groupId>
262 <artifactId>maven-resources-plugin</artifactId>
265 <id>license-javadocs</id>
266 <phase>prepare-package</phase>
268 <goal>copy-resources</goal>
271 <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
274 <directory>src/main/javadoc/META-INF/</directory>
275 <targetPath>META-INF/</targetPath>
277 <include>LICENSE</include>
278 <include>NOTICE</include>
280 <filtering>true</filtering>
290 <!-- Skip the tests in this module -->
292 <id>skipThriftTests</id>
295 <name>skipThriftTests</name>
299 <surefire.skipFirstPart>true</surefire.skipFirstPart>
300 <surefire.skipSecondPart>true</surefire.skipSecondPart>
305 Profile for regenerating the thrift java classes.
306 The generated files are to be committed to version control.
308 mvn compile -Pcompile-thrift
311 <id>compile-thrift</id>
315 <groupId>org.apache.maven.plugins</groupId>
316 <artifactId>maven-enforcer-plugin</artifactId>
319 <id>enforce-thrift-version</id>
326 <property>thrift.version</property>
327 <message>"The Thrift version must be specified."</message>
328 <regex>0\.12\.0</regex>
332 [FATAL] ==========================================================================================
333 [FATAL] HBase Thrift requires the thrift generator version 0.12.0.
334 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
335 [FATAL] ==========================================================================================
347 <groupId>org.codehaus.mojo</groupId>
348 <artifactId>exec-maven-plugin</artifactId>
349 <version>${exec.maven.version}</version>
352 <id>check-thrift-version</id>
353 <phase>generate-sources</phase>
358 <executable>sh</executable>
359 <workingDirectory>${basedir}</workingDirectory>
361 <argument>-c</argument>
362 <argument>${thrift.path} -version | \
363 fgrep 'Thrift version ${thrift.version}' && exit 0;
364 echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
371 <phase>generate-sources</phase>
376 <executable>${thrift.path}</executable>
377 <workingDirectory>${basedir}</workingDirectory>
379 <argument>-strict</argument>
380 <argument>--gen</argument>
381 <argument>java</argument>
382 <argument>-out</argument>
383 <argument>${basedir}/src/main/java</argument>
384 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
390 <phase>generate-sources</phase>
395 <executable>${thrift.path}</executable>
396 <workingDirectory>${basedir}</workingDirectory>
398 <argument>-strict</argument>
399 <argument>--gen</argument>
400 <argument>java</argument>
401 <argument>-out</argument>
402 <argument>${basedir}/src/main/java</argument>
403 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
413 <!-- profile against Hadoop 2.x: This is the default -->
418 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
420 <name>!hadoop.profile</name>
425 <groupId>org.apache.hadoop</groupId>
426 <artifactId>hadoop-client</artifactId>
429 <groupId>com.google.guava</groupId>
430 <artifactId>guava</artifactId>
435 <groupId>org.apache.hadoop</groupId>
436 <artifactId>hadoop-mapreduce-client-core</artifactId>
439 <groupId>com.google.guava</groupId>
440 <artifactId>guava</artifactId>
445 <groupId>org.apache.hadoop</groupId>
446 <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
447 <type>test-jar</type>
451 <groupId>com.google.guava</groupId>
452 <artifactId>guava</artifactId>
457 <groupId>org.apache.hadoop</groupId>
458 <artifactId>hadoop-common</artifactId>
461 <groupId>org.apache.hadoop</groupId>
462 <artifactId>hadoop-minicluster</artifactId>
466 <groupId>com.google.guava</groupId>
467 <artifactId>guava</artifactId>
470 <groupId>org.apache.zookeeper</groupId>
471 <artifactId>zookeeper</artifactId>
479 <artifactId>maven-dependency-plugin</artifactId>
482 <id>create-mrapp-generated-classpath</id>
483 <phase>generate-test-resources</phase>
485 <goal>build-classpath</goal>
488 <!-- needed to run the unit test for DS to generate
489 the required classpath that is required in the env
490 of the launch container in the mini mr/yarn cluster
492 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
503 profile for building against Hadoop 3.0.x. Activate using:
504 mvn -Dhadoop.profile=3.0
510 <name>hadoop.profile</name>
516 <groupId>org.apache.hadoop</groupId>
517 <artifactId>hadoop-common</artifactId>
520 <groupId>org.apache.hadoop</groupId>
521 <artifactId>hadoop-minicluster</artifactId>
527 <artifactId>maven-dependency-plugin</artifactId>
530 <id>create-mrapp-generated-classpath</id>
531 <phase>generate-test-resources</phase>
533 <goal>build-classpath</goal>
536 <!-- needed to run the unit test for DS to generate
537 the required classpath that is required in the env
538 of the launch container in the mini mr/yarn cluster
540 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
550 <id>eclipse-specific</id>
553 <name>m2e.version</name>
559 <!--This plugin's configuration is used to store Eclipse m2e settings
560 only. It has no influence on the Maven build itself.-->
562 <groupId>org.eclipse.m2e</groupId>
563 <artifactId>lifecycle-mapping</artifactId>
565 <lifecycleMappingMetadata>
568 <pluginExecutionFilter>
569 <groupId>org.apache.maven.plugins</groupId>
570 <artifactId>maven-antrun-plugin</artifactId>
571 <versionRange>[1.6,)</versionRange>
575 </pluginExecutionFilter>
581 <pluginExecutionFilter>
582 <groupId>org.apache.maven.plugins</groupId>
583 <artifactId>maven-dependency-plugin</artifactId>
584 <versionRange>[2.8,)</versionRange>
586 <goal>build-classpath</goal>
588 </pluginExecutionFilter>
594 </lifecycleMappingMetadata>