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-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>
49 <directory>src/test/resources/META-INF/</directory>
50 <targetPath>META-INF/</targetPath>
52 <include>LICENSE</include>
53 <include>NOTICE</include>
55 <filtering>true</filtering>
58 <directory>src/test/resources</directory>
60 <include>**/**</include>
67 <groupId>org.apache.maven.plugins</groupId>
68 <artifactId>maven-site-plugin</artifactId>
74 <!--Make it so assembly:single does nothing in here-->
75 <artifactId>maven-assembly-plugin</artifactId>
77 <skipAssembly>true</skipAssembly>
80 <!-- General ant tasks, bound to different build phases -->
82 <artifactId>maven-antrun-plugin</artifactId>
84 <!-- Generate web app sources -->
87 <phase>generate-sources</phase>
90 <property name="build.webapps" location="${project.build.directory}/hbase-webapps"/>
91 <property name="src.webapps"
92 location="${basedir}/src/main/resources/hbase-webapps"/>
93 <property name="generated.sources"
94 location="${project.build.directory}/generated-sources"/>
95 <mkdir dir="${build.webapps}"/>
96 <copy todir="${build.webapps}">
97 <fileset dir="${src.webapps}">
98 <exclude name="**/*.jsp"/>
99 <exclude name="**/.*"/>
100 <exclude name="**/*~"/>
103 <!--The compile.classpath is passed in by maven -->
104 <taskdef classname="org.apache.jasper.JspC" name="jspcompiler"
105 classpathref="maven.compile.classpath"/>
106 <mkdir dir="${build.webapps}/thrift/WEB-INF"/>
107 <jspcompiler uriroot="${src.webapps}/thrift" outputdir="${generated.sources}/java"
108 package="org.apache.hadoop.hbase.generated.thrift"
109 webxml="${build.webapps}/thrift/WEB-INF/web.xml"/>
119 <groupId>org.codehaus.mojo</groupId>
120 <artifactId>build-helper-maven-plugin</artifactId>
122 <!-- Add the generated sources -->
124 <id>jspcSource-packageInfo-source</id>
125 <phase>generate-sources</phase>
127 <goal>add-source</goal>
131 <source>${project.build.directory}/generated-sources/java</source>
137 <!-- Make a jar and put the sources in the jar -->
139 <groupId>org.apache.maven.plugins</groupId>
140 <artifactId>maven-source-plugin</artifactId>
145 <!--This plugin's configuration is used to store Eclipse m2e settings
146 only. It has no influence on the Maven build itself.-->
148 <groupId>org.eclipse.m2e</groupId>
149 <artifactId>lifecycle-mapping</artifactId>
151 <lifecycleMappingMetadata>
154 <pluginExecutionFilter>
155 <groupId>org.apache.maven.plugins</groupId>
156 <artifactId>maven-antrun-plugin</artifactId>
157 <versionRange>[1.6,)</versionRange>
161 </pluginExecutionFilter>
167 <pluginExecutionFilter>
168 <groupId>org.apache.maven.plugins</groupId>
169 <artifactId>maven-dependency-plugin</artifactId>
170 <versionRange>[2.8,)</versionRange>
172 <goal>build-classpath</goal>
174 </pluginExecutionFilter>
180 <pluginExecutionFilter>
181 <groupId>org.apache.maven.plugins</groupId>
182 <artifactId>maven-compiler-plugin</artifactId>
183 <versionRange>[3.2,)</versionRange>
187 </pluginExecutionFilter>
193 </lifecycleMappingMetadata>
201 <!-- Intra-project dependencies -->
203 <groupId>org.apache.hbase</groupId>
204 <artifactId>hbase-common</artifactId>
208 <groupId>org.apache.hbase</groupId>
209 <artifactId>hbase-annotations</artifactId>
210 <type>test-jar</type>
214 <groupId>org.apache.hbase</groupId>
215 <artifactId>hbase-protocol</artifactId>
218 <groupId>org.apache.hbase</groupId>
219 <artifactId>hbase-client</artifactId>
222 <groupId>org.apache.hbase.thirdparty</groupId>
223 <artifactId>hbase-shaded-miscellaneous</artifactId>
226 <groupId>commons-logging</groupId>
227 <artifactId>commons-logging</artifactId>
230 <groupId>commons-cli</groupId>
231 <artifactId>commons-cli</artifactId>
234 <groupId>org.apache.commons</groupId>
235 <artifactId>commons-lang3</artifactId>
238 <groupId>org.apache.commons</groupId>
239 <artifactId>commons-collections4</artifactId>
242 <groupId>org.apache.hbase</groupId>
243 <artifactId>hbase-server</artifactId>
246 <groupId>org.apache.hbase</groupId>
247 <artifactId>hbase-testing-util</artifactId>
251 <groupId>org.apache.hbase</groupId>
252 <artifactId>hbase-hadoop-compat</artifactId>
255 <groupId>org.apache.hbase</groupId>
256 <artifactId>${compat.module}</artifactId>
257 <version>${project.version}</version>
260 <groupId>org.apache.thrift</groupId>
261 <artifactId>libthrift</artifactId>
264 <groupId>org.slf4j</groupId>
265 <artifactId>slf4j-api</artifactId>
268 <groupId>org.eclipse.jetty</groupId>
269 <artifactId>jetty-server</artifactId>
272 <groupId>org.eclipse.jetty</groupId>
273 <artifactId>jetty-servlet</artifactId>
276 <!--Ant task needs this-->
277 <groupId>org.eclipse.jetty</groupId>
278 <artifactId>jetty-jsp</artifactId>
281 <groupId>junit</groupId>
282 <artifactId>junit</artifactId>
286 <groupId>org.eclipse.jetty</groupId>
287 <artifactId>jetty-http</artifactId>
290 <groupId>javax.servlet</groupId>
291 <artifactId>javax.servlet-api</artifactId>
294 <groupId>org.eclipse.jetty</groupId>
295 <artifactId>jetty-util</artifactId>
298 <!--For JspC used in ant task-->
299 <groupId>org.glassfish.web</groupId>
300 <artifactId>javax.servlet.jsp</artifactId>
302 <!-- Specifically needed for jetty-jsp, included
303 to bypass version scanning that hits a bad repo
306 <groupId>org.glassfish</groupId>
307 <artifactId>javax.el</artifactId>
312 <!-- Needs to make the profile in apache parent pom -->
314 <id>apache-release</id>
318 <groupId>org.apache.maven.plugins</groupId>
319 <artifactId>maven-resources-plugin</artifactId>
322 <id>license-javadocs</id>
323 <phase>prepare-package</phase>
325 <goal>copy-resources</goal>
328 <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
331 <directory>src/main/javadoc/META-INF/</directory>
332 <targetPath>META-INF/</targetPath>
334 <include>LICENSE</include>
335 <include>NOTICE</include>
337 <filtering>true</filtering>
347 <!-- Skip the tests in this module -->
349 <id>skipThriftTests</id>
352 <name>skipThriftTests</name>
356 <surefire.skipFirstPart>true</surefire.skipFirstPart>
357 <surefire.skipSecondPart>true</surefire.skipSecondPart>
362 Profile for regenerating the thrift java classes.
363 The generated files are to be committed to version control.
365 mvn compile -Pcompile-thrift
368 <id>compile-thrift</id>
372 <groupId>org.apache.maven.plugins</groupId>
373 <artifactId>maven-enforcer-plugin</artifactId>
376 <id>enforce-thrift-version</id>
383 <property>thrift.version</property>
384 <message>"The Thrift version must be specified."</message>
385 <regex>0\.9\.3</regex>
389 [FATAL] ==========================================================================================
390 [FATAL] HBase Thrift requires the thrift generator version 0.9.3.
391 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
392 [FATAL] ==========================================================================================
404 <groupId>org.codehaus.mojo</groupId>
405 <artifactId>exec-maven-plugin</artifactId>
406 <version>${exec.maven.version}</version>
409 <id>check-thrift-version</id>
410 <phase>generate-sources</phase>
415 <executable>sh</executable>
416 <workingDirectory>${basedir}</workingDirectory>
418 <argument>-c</argument>
419 <argument>${thrift.path} -version | \
420 fgrep 'Thrift version ${thrift.version}' && exit 0;
421 echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
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/thrift/Hbase.thrift</argument>
447 <phase>generate-sources</phase>
452 <executable>${thrift.path}</executable>
453 <workingDirectory>${basedir}</workingDirectory>
455 <argument>-strict</argument>
456 <argument>--gen</argument>
457 <argument>java:hashcode</argument>
458 <argument>-out</argument>
459 <argument>${basedir}/src/main/java</argument>
460 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
470 <!-- profile against Hadoop 2.x: This is the default -->
475 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
477 <name>!hadoop.profile</name>
482 <groupId>org.apache.hadoop</groupId>
483 <artifactId>hadoop-client</artifactId>
486 <groupId>com.google.guava</groupId>
487 <artifactId>guava</artifactId>
492 <groupId>org.apache.hadoop</groupId>
493 <artifactId>hadoop-mapreduce-client-core</artifactId>
496 <groupId>com.google.guava</groupId>
497 <artifactId>guava</artifactId>
502 <groupId>org.apache.hadoop</groupId>
503 <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
504 <type>test-jar</type>
508 <groupId>com.google.guava</groupId>
509 <artifactId>guava</artifactId>
514 <groupId>org.apache.hadoop</groupId>
515 <artifactId>hadoop-common</artifactId>
518 <groupId>org.apache.htrace</groupId>
519 <artifactId>htrace-core</artifactId>
524 <groupId>org.apache.hadoop</groupId>
525 <artifactId>hadoop-minicluster</artifactId>
529 <groupId>org.apache.htrace</groupId>
530 <artifactId>htrace-core</artifactId>
533 <groupId>com.google.guava</groupId>
534 <artifactId>guava</artifactId>
542 <artifactId>maven-dependency-plugin</artifactId>
545 <id>create-mrapp-generated-classpath</id>
546 <phase>generate-test-resources</phase>
548 <goal>build-classpath</goal>
551 <!-- needed to run the unit test for DS to generate
552 the required classpath that is required in the env
553 of the launch container in the mini mr/yarn cluster
555 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
566 profile for building against Hadoop 3.0.x. Activate using:
567 mvn -Dhadoop.profile=3.0
573 <name>hadoop.profile</name>
578 <hadoop.version>3.0-SNAPSHOT</hadoop.version>
582 <groupId>org.apache.hadoop</groupId>
583 <artifactId>hadoop-common</artifactId>
586 <groupId>org.apache.htrace</groupId>
587 <artifactId>htrace-core</artifactId>
592 <groupId>org.apache.hadoop</groupId>
593 <artifactId>hadoop-minicluster</artifactId>
596 <groupId>org.apache.htrace</groupId>
597 <artifactId>htrace-core</artifactId>
605 <artifactId>maven-dependency-plugin</artifactId>
608 <id>create-mrapp-generated-classpath</id>
609 <phase>generate-test-resources</phase>
611 <goal>build-classpath</goal>
614 <!-- needed to run the unit test for DS to generate
615 the required classpath that is required in the env
616 of the launch container in the mini mr/yarn cluster
618 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath