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>
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>
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>
161 <lifecycleMappingMetadata>
164 <pluginExecutionFilter>
165 <groupId>org.apache.maven.plugins</groupId>
166 <artifactId>maven-antrun-plugin</artifactId>
167 <versionRange>[1.6,)</versionRange>
171 </pluginExecutionFilter>
177 <pluginExecutionFilter>
178 <groupId>org.apache.maven.plugins</groupId>
179 <artifactId>maven-dependency-plugin</artifactId>
180 <versionRange>[2.8,)</versionRange>
182 <goal>build-classpath</goal>
184 </pluginExecutionFilter>
190 </lifecycleMappingMetadata>
198 <!-- Intra-project dependencies -->
200 <groupId>org.apache.hbase</groupId>
201 <artifactId>hbase-common</artifactId>
205 <groupId>org.apache.hbase</groupId>
206 <artifactId>hbase-annotations</artifactId>
207 <type>test-jar</type>
211 <groupId>org.apache.hbase</groupId>
212 <artifactId>hbase-protocol</artifactId>
215 <groupId>org.apache.hbase</groupId>
216 <artifactId>hbase-client</artifactId>
219 <groupId>org.apache.hbase.thirdparty</groupId>
220 <artifactId>hbase-shaded-miscellaneous</artifactId>
223 <groupId>org.slf4j</groupId>
224 <artifactId>slf4j-api</artifactId>
227 <groupId>org.apache.commons</groupId>
228 <artifactId>commons-lang3</artifactId>
231 <groupId>org.apache.hbase</groupId>
232 <artifactId>hbase-server</artifactId>
235 <groupId>org.apache.hbase</groupId>
236 <artifactId>hbase-testing-util</artifactId>
240 <groupId>org.apache.hbase</groupId>
241 <artifactId>hbase-hadoop-compat</artifactId>
244 <groupId>org.apache.hbase</groupId>
245 <artifactId>${compat.module}</artifactId>
246 <version>${project.version}</version>
249 <groupId>org.apache.thrift</groupId>
250 <artifactId>libthrift</artifactId>
253 <groupId>org.eclipse.jetty</groupId>
254 <artifactId>jetty-server</artifactId>
257 <groupId>org.eclipse.jetty</groupId>
258 <artifactId>jetty-servlet</artifactId>
261 <!--Ant task needs this-->
262 <groupId>org.eclipse.jetty</groupId>
263 <artifactId>jetty-jsp</artifactId>
266 <groupId>junit</groupId>
267 <artifactId>junit</artifactId>
271 <groupId>org.eclipse.jetty</groupId>
272 <artifactId>jetty-http</artifactId>
275 <groupId>javax.servlet</groupId>
276 <artifactId>javax.servlet-api</artifactId>
279 <groupId>org.eclipse.jetty</groupId>
280 <artifactId>jetty-util</artifactId>
283 <!--For JspC used in ant task-->
284 <groupId>org.glassfish.web</groupId>
285 <artifactId>javax.servlet.jsp</artifactId>
287 <!-- Specifically needed for jetty-jsp, included
288 to bypass version scanning that hits a bad repo
291 <groupId>org.glassfish</groupId>
292 <artifactId>javax.el</artifactId>
297 <!-- Needs to make the profile in apache parent pom -->
299 <id>apache-release</id>
303 <groupId>org.apache.maven.plugins</groupId>
304 <artifactId>maven-resources-plugin</artifactId>
307 <id>license-javadocs</id>
308 <phase>prepare-package</phase>
310 <goal>copy-resources</goal>
313 <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
316 <directory>src/main/javadoc/META-INF/</directory>
317 <targetPath>META-INF/</targetPath>
319 <include>LICENSE</include>
320 <include>NOTICE</include>
322 <filtering>true</filtering>
332 <!-- Skip the tests in this module -->
334 <id>skipThriftTests</id>
337 <name>skipThriftTests</name>
341 <surefire.skipFirstPart>true</surefire.skipFirstPart>
342 <surefire.skipSecondPart>true</surefire.skipSecondPart>
347 Profile for regenerating the thrift java classes.
348 The generated files are to be committed to version control.
350 mvn compile -Pcompile-thrift
353 <id>compile-thrift</id>
357 <groupId>org.apache.maven.plugins</groupId>
358 <artifactId>maven-enforcer-plugin</artifactId>
361 <id>enforce-thrift-version</id>
368 <property>thrift.version</property>
369 <message>"The Thrift version must be specified."</message>
370 <regex>0\.9\.3</regex>
374 [FATAL] ==========================================================================================
375 [FATAL] HBase Thrift requires the thrift generator version 0.9.3.
376 [FATAL] Setting it to something else needs to be reviewed for wire and behavior compatibility.
377 [FATAL] ==========================================================================================
389 <groupId>org.codehaus.mojo</groupId>
390 <artifactId>exec-maven-plugin</artifactId>
391 <version>${exec.maven.version}</version>
394 <id>check-thrift-version</id>
395 <phase>generate-sources</phase>
400 <executable>sh</executable>
401 <workingDirectory>${basedir}</workingDirectory>
403 <argument>-c</argument>
404 <argument>${thrift.path} -version | \
405 fgrep 'Thrift version ${thrift.version}' && exit 0;
406 echo "========== [FATAL] Need Thrift version ${thrift.version} ==========";
413 <phase>generate-sources</phase>
418 <executable>${thrift.path}</executable>
419 <workingDirectory>${basedir}</workingDirectory>
421 <argument>-strict</argument>
422 <argument>--gen</argument>
423 <argument>java:hashcode</argument>
424 <argument>-out</argument>
425 <argument>${basedir}/src/main/java</argument>
426 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift</argument>
432 <phase>generate-sources</phase>
437 <executable>${thrift.path}</executable>
438 <workingDirectory>${basedir}</workingDirectory>
440 <argument>-strict</argument>
441 <argument>--gen</argument>
442 <argument>java:hashcode</argument>
443 <argument>-out</argument>
444 <argument>${basedir}/src/main/java</argument>
445 <argument>${basedir}/src/main/resources/org/apache/hadoop/hbase/thrift2/hbase.thrift</argument>
455 <!-- profile against Hadoop 2.x: This is the default -->
460 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
462 <name>!hadoop.profile</name>
467 <groupId>org.apache.hadoop</groupId>
468 <artifactId>hadoop-client</artifactId>
471 <groupId>com.google.guava</groupId>
472 <artifactId>guava</artifactId>
477 <groupId>org.apache.hadoop</groupId>
478 <artifactId>hadoop-mapreduce-client-core</artifactId>
481 <groupId>com.google.guava</groupId>
482 <artifactId>guava</artifactId>
487 <groupId>org.apache.hadoop</groupId>
488 <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
489 <type>test-jar</type>
493 <groupId>com.google.guava</groupId>
494 <artifactId>guava</artifactId>
499 <groupId>org.apache.hadoop</groupId>
500 <artifactId>hadoop-common</artifactId>
503 <groupId>org.apache.htrace</groupId>
504 <artifactId>htrace-core</artifactId>
509 <groupId>org.apache.hadoop</groupId>
510 <artifactId>hadoop-minicluster</artifactId>
514 <groupId>org.apache.htrace</groupId>
515 <artifactId>htrace-core</artifactId>
518 <groupId>com.google.guava</groupId>
519 <artifactId>guava</artifactId>
522 <groupId>org.apache.zookeeper</groupId>
523 <artifactId>zookeeper</artifactId>
531 <artifactId>maven-dependency-plugin</artifactId>
534 <id>create-mrapp-generated-classpath</id>
535 <phase>generate-test-resources</phase>
537 <goal>build-classpath</goal>
540 <!-- needed to run the unit test for DS to generate
541 the required classpath that is required in the env
542 of the launch container in the mini mr/yarn cluster
544 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath
555 profile for building against Hadoop 3.0.x. Activate using:
556 mvn -Dhadoop.profile=3.0
562 <name>hadoop.profile</name>
568 <groupId>org.apache.hadoop</groupId>
569 <artifactId>hadoop-common</artifactId>
572 <groupId>org.apache.hadoop</groupId>
573 <artifactId>hadoop-minicluster</artifactId>
576 <groupId>org.apache.htrace</groupId>
577 <artifactId>htrace-core</artifactId>
585 <artifactId>maven-dependency-plugin</artifactId>
588 <id>create-mrapp-generated-classpath</id>
589 <phase>generate-test-resources</phase>
591 <goal>build-classpath</goal>
594 <!-- needed to run the unit test for DS to generate
595 the required classpath that is required in the env
596 of the launch container in the mini mr/yarn cluster
598 <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath