HBASE-21138 Close HRegion instance at the end of every test in TestHRegion
[hbase.git] / hbase-server / pom.xml
blob473b7409de74baf803f8a66d34a92cba0481928d
1 <?xml version="1.0"?>
2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3   <!--
4 /**
5  * Licensed to the Apache Software Foundation (ASF) under one
6  * or more contributor license agreements.  See the NOTICE file
7  * distributed with this work for additional information
8  * regarding copyright ownership.  The ASF licenses this file
9  * to you under the Apache License, Version 2.0 (the
10  * "License"); you may not use this file except in compliance
11  * with the License.  You may obtain a copy of the License at
12  *
13  *     http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 -->
22 <!-- for testing -->
23   <modelVersion>4.0.0</modelVersion>
24   <parent>
25     <artifactId>hbase-build-configuration</artifactId>
26     <groupId>org.apache.hbase</groupId>
27     <version>3.0.0-SNAPSHOT</version>
28     <relativePath>../hbase-build-configuration</relativePath>
29   </parent>
30   <artifactId>hbase-server</artifactId>
31   <name>Apache HBase - Server</name>
32   <description>Server functionality for HBase</description>
33   <properties>
34     <test.build.webapps>target/test-classes/webapps</test.build.webapps>
35     <license.bundles.logo>true</license.bundles.logo>
36     <license.bundles.bootstrap>true</license.bundles.bootstrap>
37     <license.bundles.jquery>true</license.bundles.jquery>
38   </properties>
39   <build>
40     <!-- Make sure resources get added before they are processed
41       by placing this first
42      -->
43     <resources>
44       <!-- Add the build webabpps to the classpth -->
45       <resource>
46         <directory>${project.build.directory}</directory>
47         <includes>
48           <include>hbase-webapps/**</include>
49         </includes>
50       </resource>
51     </resources>
52     <testResources>
53       <!-- Our test artifact has different license info than our source/bin ones -->
54       <testResource>
55         <directory>src/test/resources/META-INF/</directory>
56         <targetPath>META-INF/</targetPath>
57         <includes>
58           <include>NOTICE</include>
59         </includes>
60         <filtering>true</filtering>
61       </testResource>
62       <testResource>
63         <directory>src/test/resources</directory>
64         <includes>
65           <include>**/**</include>
66         </includes>
67       </testResource>
68     </testResources>
69     <plugins>
70       <!-- licensing info from our bundled works -->
71       <plugin>
72         <groupId>org.apache.maven.plugins</groupId>
73         <artifactId>maven-remote-resources-plugin</artifactId>
74         <version>1.5</version>
75         <dependencies>
76           <!-- resource bundle only needed at build time -->
77           <dependency>
78             <groupId>org.apache.hbase</groupId>
79             <artifactId>hbase-resource-bundle</artifactId>
80             <version>${project.version}</version>
81           </dependency>
82         </dependencies>
83         <executions>
84           <execution>
85             <id>default</id>
86             <configuration>
87               <attachToTest>false</attachToTest>
88               <properties>
89                 <copyright-end-year>${build.year}</copyright-end-year>
90                 <debug-print-included-work-info>${license.debug.print.included}</debug-print-included-work-info>
91                 <bundled-dependencies>${license.bundles.dependencies}</bundled-dependencies>
92                 <bundled-jquery>${license.bundles.jquery}</bundled-jquery>
93                 <bundled-logo>${license.bundles.logo}</bundled-logo>
94                 <bundled-bootstrap>${license.bundles.bootstrap}</bundled-bootstrap>
95               </properties>
96               <resourceBundles>
97                 <resourceBundle>${project.groupId}:hbase-resource-bundle:${project.version}</resourceBundle>
98               </resourceBundles>
99               <supplementalModelArtifacts>
100                 <supplementalModelArtifact>${project.groupId}:hbase-resource-bundle:${project.version}</supplementalModelArtifact>
101               </supplementalModelArtifacts>
102               <supplementalModels>
103                 <supplementalModel>supplemental-models.xml</supplementalModel>
104               </supplementalModels>
105             </configuration>
106           </execution>
107         </executions>
108       </plugin>
109       <!-- Run with -Dmaven.test.skip.exec=true to build -tests.jar without running
110         tests (this is needed for upstream projects whose tests need this jar simply for
111         compilation) -->
112       <plugin>
113         <!--Make it so assembly:single does nothing in here-->
114         <artifactId>maven-assembly-plugin</artifactId>
115         <configuration>
116           <skipAssembly>true</skipAssembly>
117         </configuration>
118       </plugin>
119       <plugin>
120         <groupId>org.apache.maven.plugins</groupId>
121         <artifactId>maven-jar-plugin</artifactId>
122         <configuration>
123           <!-- Exclude these 2 packages, because their dependency _binary_ files
124             include the sources, and Maven 2.2 appears to add them to the sources to compile,
125             weird -->
126           <excludes>
127             <exclude>org/apache/jute/**</exclude>
128             <exclude>org/apache/zookeeper/**</exclude>
129             <exclude>**/*.jsp</exclude>
130             <exclude>hbase-site.xml</exclude>
131             <exclude>hdfs-site.xml</exclude>
132             <exclude>log4j.properties</exclude>
133             <exclude>mapred-queues.xml</exclude>
134             <exclude>mapred-site.xml</exclude>
135           </excludes>
136         </configuration>
137       </plugin>
138       <!-- General ant tasks, bound to different build phases -->
139       <plugin>
140         <artifactId>maven-antrun-plugin</artifactId>
141         <executions>
142           <!-- Generate web app sources -->
143           <execution>
144             <id>generate</id>
145             <phase>generate-sources</phase>
146             <configuration>
147               <target>
148                 <property name="build.webapps" location="${project.build.directory}/hbase-webapps"/>
149                 <property name="src.webapps" location="${basedir}/src/main/resources/hbase-webapps"/>
150                 <property name="generated.sources" location="${project.build.directory}/generated-sources"/>
151                 <mkdir dir="${build.webapps}"/>
152                 <copy todir="${build.webapps}">
153                   <fileset dir="${src.webapps}">
154                     <exclude name="**/*.jsp"/>
155                     <exclude name="**/.*"/>
156                     <exclude name="**/*~"/>
157                   </fileset>
158                 </copy>
159                 <!--The compile.classpath is passed in by maven -->
160                 <taskdef classname="org.apache.jasper.JspC" name="jspcompiler" classpathref="maven.compile.classpath"/>
161                 <mkdir dir="${build.webapps}/master/WEB-INF"/>
162                 <jspcompiler uriroot="${src.webapps}/master" outputdir="${generated.sources}/java" package="org.apache.hadoop.hbase.generated.master" webxml="${build.webapps}/master/WEB-INF/web.xml"/>
163                 <mkdir dir="${build.webapps}/regionserver/WEB-INF"/>
164                 <jspcompiler uriroot="${src.webapps}/regionserver" outputdir="${generated.sources}/java" package="org.apache.hadoop.hbase.generated.regionserver" webxml="${build.webapps}/regionserver/WEB-INF/web.xml"/>
165               </target>
166             </configuration>
167             <goals>
168               <goal>run</goal>
169             </goals>
170           </execution>
171         </executions>
172       </plugin>
173       <plugin>
174         <groupId>org.codehaus.mojo</groupId>
175         <artifactId>build-helper-maven-plugin</artifactId>
176         <executions>
177           <!-- Add the generated sources -->
178           <execution>
179             <id>jspcSource-packageInfo-source</id>
180             <phase>generate-sources</phase>
181             <goals>
182               <goal>add-source</goal>
183             </goals>
184             <configuration>
185               <sources>
186                 <source>${project.build.directory}/generated-jamon</source>
187                 <source>${project.build.directory}/generated-sources/java</source>
188               </sources>
189             </configuration>
190           </execution>
191         </executions>
192       </plugin>
193       <plugin>
194         <groupId>org.jamon</groupId>
195         <artifactId>jamon-maven-plugin</artifactId>
196         <executions>
197           <execution>
198             <phase>generate-sources</phase>
199             <goals>
200               <goal>translate</goal>
201             </goals>
202             <configuration>
203               <templateSourceDir>src/main/jamon</templateSourceDir>
204               <templateOutputDir>target/generated-jamon</templateOutputDir>
205             </configuration>
206           </execution>
207         </executions>
208       </plugin>
209       <!-- General plugins -->
210       <plugin>
211         <groupId>org.apache.maven.plugins</groupId>
212         <artifactId>maven-eclipse-plugin</artifactId>
213         <configuration>
214           <additionalProjectnatures>
215             <projectnature>org.jamon.project.jamonnature</projectnature>
216           </additionalProjectnatures>
217           <buildcommands>
218             <buildcommand>org.jamon.project.templateBuilder</buildcommand>
219             <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
220             <buildcommand>org.jamon.project.markerUpdater</buildcommand>
221           </buildcommands>
222           <additionalConfig>
223             <file>
224               <name>.settings/org.jamon.prefs</name>
225               <content># now
226                 eclipse.preferences.version=1
227                 templateSourceDir=src/main/jamon
228                 templateOutputDir=target/generated-jamon
229               </content>
230             </file>
231           </additionalConfig>
232         </configuration>
233       </plugin>
234       <!-- Run findbugs -->
235       <plugin>
236         <groupId>org.codehaus.mojo</groupId>
237         <artifactId>findbugs-maven-plugin</artifactId>
238       </plugin>
239       <!-- Testing plugins -->
240       <plugin>
241         <artifactId>maven-surefire-plugin</artifactId>
242         <configuration>
243           <systemPropertyVariables>
244             <test.build.webapps>target/test-classes/webapps</test.build.webapps>
245           </systemPropertyVariables>
246         </configuration>
247       </plugin>
248       <plugin>
249         <groupId>net.revelc.code</groupId>
250         <artifactId>warbucks-maven-plugin</artifactId>
251       </plugin>
252     </plugins>
253     <!-- General Resources -->
254     <pluginManagement>
255        <plugins>
256          <!--This plugin's configuration is used to store Eclipse m2e settings
257              only. It has no influence on the Maven build itself and needs to
258              be kept in plugin management, not in the actual plugins. -->
259         <plugin>
260           <groupId>org.eclipse.m2e</groupId>
261           <artifactId>lifecycle-mapping</artifactId>
262           <configuration>
263             <lifecycleMappingMetadata>
264               <pluginExecutions>
265                 <pluginExecution>
266                   <pluginExecutionFilter>
267                     <groupId>org.jamon</groupId>
268                     <artifactId>jamon-maven-plugin</artifactId>
269                     <versionRange>[2.3.4,)</versionRange>
270                     <goals>
271                       <goal>translate</goal>
272                     </goals>
273                   </pluginExecutionFilter>
274                   <action>
275                       <execute>
276                         <runOnIncremental>false</runOnIncremental>
277                         <runOnConfiguration>true</runOnConfiguration>
278                       </execute>
279                   </action>
280                 </pluginExecution>
281                 <pluginExecution>
282                   <pluginExecutionFilter>
283                     <groupId>org.apache.maven.plugins</groupId>
284                     <artifactId>maven-antrun-plugin</artifactId>
285                     <versionRange>[1.6,)</versionRange>
286                     <goals>
287                       <goal>run</goal>
288                     </goals>
289                   </pluginExecutionFilter>
290                   <action>
291                     <execute>
292                       <runOnIncremental>false</runOnIncremental>
293                       <runOnConfiguration>true</runOnConfiguration>
294                     </execute>
295                   </action>
296                 </pluginExecution>
297                 <pluginExecution>
298                   <pluginExecutionFilter>
299                     <groupId>org.apache.maven.plugins</groupId>
300                     <artifactId>maven-dependency-plugin</artifactId>
301                     <versionRange>[2.8,)</versionRange>
302                     <goals>
303                       <goal>build-classpath</goal>
304                     </goals>
305                   </pluginExecutionFilter>
306                   <action>
307                     <ignore></ignore>
308                   </action>
309                 </pluginExecution>
310               </pluginExecutions>
311             </lifecycleMappingMetadata>
312           </configuration>
313         </plugin>
314       </plugins>
315     </pluginManagement>
316   </build>
317   <dependencies>
318     <dependency>
319       <groupId>org.apache.hbase.thirdparty</groupId>
320       <artifactId>hbase-shaded-protobuf</artifactId>
321     </dependency>
322     <dependency>
323       <groupId>org.apache.hbase.thirdparty</groupId>
324       <artifactId>hbase-shaded-netty</artifactId>
325     </dependency>
326     <dependency>
327       <groupId>org.apache.hbase.thirdparty</groupId>
328       <artifactId>hbase-shaded-miscellaneous</artifactId>
329     </dependency>
330     <!-- Intra-project dependencies -->
331     <dependency>
332       <groupId>org.apache.hbase</groupId>
333       <artifactId>hbase-common</artifactId>
334     </dependency>
335     <dependency>
336       <groupId>org.apache.hbase</groupId>
337       <artifactId>hbase-http</artifactId>
338     </dependency>
339     <dependency>
340       <groupId>org.apache.hbase</groupId>
341       <artifactId>hbase-http</artifactId>
342       <type>test-jar</type>
343       <scope>test</scope>
344     </dependency>
345     <dependency>
346       <!--Needed by the visiblity tags and acl CPEP things
347            in here in hbase-server (that should be out in hbase-endpoints
348            or integrated). -->
349       <groupId>org.apache.hbase</groupId>
350       <artifactId>hbase-protocol</artifactId>
351     </dependency>
352     <dependency>
353       <groupId>org.apache.hbase</groupId>
354       <artifactId>hbase-protocol-shaded</artifactId>
355     </dependency>
356     <dependency>
357       <groupId>org.apache.hbase</groupId>
358       <artifactId>hbase-procedure</artifactId>
359     </dependency>
360     <dependency>
361       <groupId>org.apache.hbase</groupId>
362       <artifactId>hbase-client</artifactId>
363     </dependency>
364     <dependency>
365       <groupId>org.apache.hbase</groupId>
366       <artifactId>hbase-zookeeper</artifactId>
367     </dependency>
368     <dependency>
369       <groupId>org.apache.hbase</groupId>
370       <artifactId>hbase-replication</artifactId>
371     </dependency>
372     <dependency>
373       <groupId>org.apache.hbase</groupId>
374       <artifactId>hbase-common</artifactId>
375       <type>test-jar</type>
376       <scope>test</scope>
377     </dependency>
378     <dependency>
379       <groupId>org.apache.hbase</groupId>
380       <artifactId>hbase-annotations</artifactId>
381       <type>test-jar</type>
382       <scope>test</scope>
383     </dependency>
384     <dependency>
385       <groupId>org.apache.hbase</groupId>
386       <artifactId>hbase-procedure</artifactId>
387       <type>test-jar</type>
388       <scope>test</scope>
389     </dependency>
390     <dependency>
391       <groupId>org.apache.hbase</groupId>
392       <artifactId>hbase-zookeeper</artifactId>
393       <type>test-jar</type>
394       <scope>test</scope>
395     </dependency>
396     <dependency>
397       <groupId>org.apache.hbase</groupId>
398       <artifactId>hbase-metrics-api</artifactId>
399     </dependency>
400     <dependency>
401       <groupId>org.apache.hbase</groupId>
402       <artifactId>hbase-metrics</artifactId>
403     </dependency>
404     <dependency>
405       <groupId>commons-codec</groupId>
406       <artifactId>commons-codec</artifactId>
407     </dependency>
408     <dependency>
409       <groupId>org.apache.hbase</groupId>
410       <artifactId>hbase-hadoop-compat</artifactId>
411     </dependency>
412     <dependency>
413       <groupId>org.apache.hbase</groupId>
414       <artifactId>hbase-hadoop-compat</artifactId>
415       <type>test-jar</type>
416       <scope>test</scope>
417     </dependency>
418     <dependency>
419       <groupId>org.apache.hbase</groupId>
420       <artifactId>${compat.module}</artifactId>
421       <version>${project.version}</version>
422     </dependency>
423     <dependency>
424       <groupId>org.apache.hbase</groupId>
425       <artifactId>${compat.module}</artifactId>
426       <version>${project.version}</version>
427       <type>test-jar</type>
428       <scope>test</scope>
429     </dependency>
430     <dependency>
431       <groupId>org.eclipse.jetty</groupId>
432       <artifactId>jetty-server</artifactId>
433     </dependency>
434     <dependency>
435       <groupId>org.eclipse.jetty</groupId>
436       <artifactId>jetty-servlet</artifactId>
437     </dependency>
438     <dependency>
439       <groupId>org.eclipse.jetty</groupId>
440       <artifactId>jetty-webapp</artifactId>
441     </dependency>
442     <dependency>
443       <!-- For JspC used in ant task, then needed at compile /runtime
444            because the source code made from the JSP refers to its runtime
445         -->
446       <groupId>org.glassfish.web</groupId>
447       <artifactId>javax.servlet.jsp</artifactId>
448     </dependency>
449       <!-- Also used by generated sources from our JSP -->
450     <dependency>
451       <groupId>javax.servlet.jsp</groupId>
452       <artifactId>javax.servlet.jsp-api</artifactId>
453     </dependency>
454     <!-- General dependencies -->
455     <dependency>
456        <groupId>com.github.stephenc.findbugs</groupId>
457        <artifactId>findbugs-annotations</artifactId>
458        <optional>true</optional>
459     </dependency>
460     <dependency>
461       <groupId>io.dropwizard.metrics</groupId>
462       <artifactId>metrics-core</artifactId>
463     </dependency>
464     <dependency>
465       <groupId>com.google.protobuf</groupId>
466       <artifactId>protobuf-java</artifactId>
467     </dependency>
468     <dependency>
469       <groupId>commons-io</groupId>
470       <artifactId>commons-io</artifactId>
471     </dependency>
472     <dependency>
473       <groupId>org.apache.commons</groupId>
474       <artifactId>commons-lang3</artifactId>
475     </dependency>
476     <dependency>
477       <groupId>org.slf4j</groupId>
478       <artifactId>slf4j-api</artifactId>
479     </dependency>
480     <dependency>
481       <groupId>org.apache.commons</groupId>
482       <artifactId>commons-math3</artifactId>
483     </dependency>
484     <dependency>
485       <groupId>org.slf4j</groupId>
486       <artifactId>slf4j-log4j12</artifactId>
487     </dependency>
488     <dependency>
489       <groupId>log4j</groupId>
490       <artifactId>log4j</artifactId>
491     </dependency>
492     <dependency>
493       <groupId>org.apache.zookeeper</groupId>
494       <artifactId>zookeeper</artifactId>
495     </dependency>
496     <dependency>
497       <groupId>org.jamon</groupId>
498       <artifactId>jamon-runtime</artifactId>
499     </dependency>
500     <dependency>
501       <groupId>javax.servlet</groupId>
502       <artifactId>javax.servlet-api</artifactId>
503     </dependency>
504     <!-- Jackson only used in compile/runtime scope by BlockCacheUtil class
505          also used by some tests
506       -->
507     <dependency>
508       <groupId>com.fasterxml.jackson.core</groupId>
509       <artifactId>jackson-databind</artifactId>
510     </dependency>
511     <dependency>
512       <groupId>com.fasterxml.jackson.core</groupId>
513       <artifactId>jackson-core</artifactId>
514     </dependency>
515     <dependency>
516       <groupId>com.fasterxml.jackson.core</groupId>
517       <artifactId>jackson-annotations</artifactId>
518     </dependency>
520     <!-- tracing Dependencies -->
521     <dependency>
522       <groupId>org.apache.htrace</groupId>
523       <artifactId>htrace-core4</artifactId>
524     </dependency>
525     <dependency>
526       <groupId>com.lmax</groupId>
527       <artifactId>disruptor</artifactId>
528     </dependency>
529     <!-- Test dependencies -->
530     <dependency>
531       <groupId>org.hamcrest</groupId>
532       <artifactId>hamcrest-core</artifactId>
533       <scope>test</scope>
534     </dependency>
535     <dependency>
536       <groupId>org.apache.hadoop</groupId>
537       <artifactId>hadoop-minikdc</artifactId>
538       <scope>test</scope>
539     </dependency>
540     <dependency>
541       <groupId>org.bouncycastle</groupId>
542       <artifactId>bcprov-jdk16</artifactId>
543       <scope>test</scope>
544     </dependency>
545     <dependency>
546       <groupId>org.apache.kerby</groupId>
547       <artifactId>kerb-client</artifactId>
548       <scope>test</scope>
549     </dependency>
550     <dependency>
551       <groupId>org.apache.kerby</groupId>
552       <artifactId>kerb-simplekdc</artifactId>
553       <scope>test</scope>
554     </dependency>
555     <dependency>
556       <groupId>org.apache.httpcomponents</groupId>
557       <artifactId>httpclient</artifactId>
558       <scope>test</scope>
559     </dependency>
560     <dependency>
561       <groupId>org.apache.httpcomponents</groupId>
562       <artifactId>httpcore</artifactId>
563       <scope>test</scope>
564     </dependency>
565     <!-- commons-logging is used by HBTU to monkey with log levels
566          have to put it at compile scope because Hadoop's IOUtils uses it
567          both for hadoop 2.7 and 3.0, so we'll fail at compile if it's at test scope.
568       -->
569     <dependency>
570       <groupId>commons-logging</groupId>
571       <artifactId>commons-logging</artifactId>
572       <scope>compile</scope>
573     </dependency>
574     <dependency>
575       <groupId>org.apache.commons</groupId>
576       <artifactId>commons-crypto</artifactId>
577       <version>${commons-crypto.version}</version>
578       <exclusions>
579         <exclusion>
580           <groupId>net.java.dev.jna</groupId>
581           <artifactId>jna</artifactId>
582         </exclusion>
583       </exclusions>
584     </dependency>
585     <dependency>
586       <groupId>junit</groupId>
587       <artifactId>junit</artifactId>
588       <scope>test</scope>
589     </dependency>
590     <dependency>
591       <groupId>org.mockito</groupId>
592       <artifactId>mockito-core</artifactId>
593       <scope>test</scope>
594     </dependency>
595   </dependencies>
596   <profiles>
597     <!-- Needs to make the profile in apache parent pom -->
598     <profile>
599       <id>apache-release</id>
600       <build>
601         <plugins>
602           <plugin>
603             <groupId>org.apache.maven.plugins</groupId>
604             <artifactId>maven-resources-plugin</artifactId>
605             <executions>
606               <execution>
607                 <id>license-javadocs</id>
608                 <phase>prepare-package</phase>
609                 <goals>
610                   <goal>copy-resources</goal>
611                 </goals>
612                 <configuration>
613                   <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
614                   <resources>
615                     <resource>
616                       <directory>src/main/javadoc/META-INF/</directory>
617                       <targetPath>META-INF/</targetPath>
618                       <includes>
619                         <include>LICENSE</include>
620                         <include>NOTICE</include>
621                       </includes>
622                       <filtering>true</filtering>
623                     </resource>
624                   </resources>
625                 </configuration>
626               </execution>
627             </executions>
628           </plugin>
629         </plugins>
630       </build>
631     </profile>
632     <!-- Skip the tests in this module -->
633     <profile>
634       <id>skipServerTests</id>
635       <activation>
636         <property>
637           <name>skipServerTests</name>
638         </property>
639       </activation>
640       <properties>
641         <surefire.skipFirstPart>true</surefire.skipFirstPart>
642         <surefire.skipSecondPart>true</surefire.skipSecondPart>
643       </properties>
644     </profile>
645     <!-- Special builds -->
646     <profile>
647       <id>native</id>
648       <activation>
649         <activeByDefault>false</activeByDefault>
650       </activation>
651       <build>
652         <plugins>
653           <plugin>
654             <groupId>org.apache.maven.plugins</groupId>
655             <artifactId>maven-antrun-plugin</artifactId>
656             <executions>
657               <execution>
658                 <id>make</id>
659                 <phase>compile</phase>
660                 <goals><goal>run</goal></goals>
661                 <configuration>
662                   <target>
663                     <mkdir dir="${project.build.directory}/native"/>
664                     <exec executable="cmake" dir="${project.build.directory}/native" failonerror="true">
665                       <arg line="${basedir}/src/main/native -DJVM_ARCH_DATA_MODEL=${sun.arch.data.model}"/>
666                     </exec>
667                     <exec executable="make" dir="${project.build.directory}/native" failonerror="true">
668                       <arg line="VERBOSE=1"/>
669                     </exec>
670                   </target>
671                 </configuration>
672               </execution>
673             </executions>
674           </plugin>
675         </plugins>
676       </build>
677     </profile>
678     <!-- Profiles for building against different hadoop versions -->
679     <!-- There are a lot of common dependencies used here, should investigate
680     if we can combine these profiles somehow -->
682     <!-- profile for building against Hadoop 2.x.  This is the default.  -->
683     <profile>
684       <id>hadoop-2.0</id>
685       <activation>
686         <property>
687             <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
688             <!--h2--><name>!hadoop.profile</name>
689         </property>
690       </activation>
691       <dependencies>
692         <dependency>
693           <groupId>org.apache.hadoop</groupId>
694           <artifactId>hadoop-common</artifactId>
695         </dependency>
696         <dependency>
697           <groupId>org.apache.hadoop</groupId>
698           <artifactId>hadoop-mapreduce-client-core</artifactId>
699           <exclusions>
700             <exclusion>
701               <groupId>com.google.guava</groupId>
702               <artifactId>guava</artifactId>
703             </exclusion>
704           </exclusions>
705         </dependency>
706         <dependency>
707           <groupId>org.apache.hadoop</groupId>
708           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
709           <type>test-jar</type>
710           <scope>test</scope>
711           <exclusions>
712             <exclusion>
713               <groupId>com.google.guava</groupId>
714               <artifactId>guava</artifactId>
715             </exclusion>
716           </exclusions>
717         </dependency>
718         <dependency>
719           <groupId>org.apache.hadoop</groupId>
720           <artifactId>hadoop-hdfs</artifactId>
721         </dependency>
722         <dependency>
723           <groupId>org.apache.hadoop</groupId>
724           <artifactId>hadoop-hdfs</artifactId>
725           <type>test-jar</type>
726           <scope>test</scope>
727         </dependency>
728         <dependency>
729           <groupId>org.apache.hadoop</groupId>
730           <artifactId>hadoop-minicluster</artifactId>
731           <scope>test</scope>
732           <exclusions>
733             <exclusion>
734               <groupId>com.google.guava</groupId>
735               <artifactId>guava</artifactId>
736             </exclusion>
737             <exclusion>
738               <groupId>org.apache.zookeeper</groupId>
739               <artifactId>zookeeper</artifactId>
740             </exclusion>
741           </exclusions>
742         </dependency>
743         <!-- Hadoop needs Netty 3.x at test scope for the minicluster -->
744         <dependency>
745           <groupId>io.netty</groupId>
746           <artifactId>netty</artifactId>
747           <version>${netty.hadoop.version}</version>
748           <scope>test</scope>
749         </dependency>
750       </dependencies>
751       <build>
752         <plugins>
753           <plugin>
754             <artifactId>maven-dependency-plugin</artifactId>
755             <executions>
756               <execution>
757                 <id>create-mrapp-generated-classpath</id>
758                 <phase>generate-test-resources</phase>
759                 <goals>
760                   <goal>build-classpath</goal>
761                 </goals>
762                 <configuration>
763                   <!-- needed to run the unit test for DS to generate
764                   the required classpath that is required in the env
765                   of the launch container in the mini mr/yarn cluster
766                   -->
767                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
768                 </configuration>
769               </execution>
770             </executions>
771           </plugin>
772         </plugins>
773       </build>
774     </profile>
775     <!--
776       profile for building against Hadoop 3.0.x. Activate using:
777        mvn -Dhadoop.profile=3.0
778     -->
779     <profile>
780       <id>hadoop-3.0</id>
781       <activation>
782         <property>
783           <name>hadoop.profile</name>
784           <value>3.0</value>
785         </property>
786       </activation>
787       <dependencies>
788         <dependency>
789           <groupId>org.apache.hadoop</groupId>
790           <artifactId>hadoop-common</artifactId>
791         </dependency>
792         <dependency>
793           <groupId>org.apache.hadoop</groupId>
794           <artifactId>hadoop-hdfs</artifactId>
795         </dependency>
796         <dependency>
797           <groupId>org.apache.hadoop</groupId>
798           <artifactId>hadoop-hdfs-client</artifactId>
799           <version>${hadoop.version}</version>
800         </dependency>
801         <dependency>
802           <groupId>org.apache.hadoop</groupId>
803           <artifactId>hadoop-mapreduce-client-core</artifactId>
804         </dependency>
805         <dependency>
806           <groupId>org.apache.hadoop</groupId>
807           <artifactId>hadoop-hdfs</artifactId>
808           <type>test-jar</type>
809           <scope>test</scope>
810         </dependency>
811         <dependency>
812           <groupId>org.apache.hadoop</groupId>
813           <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
814           <type>test-jar</type>
815           <scope>test</scope>
816         </dependency>
817         <dependency>
818           <groupId>org.apache.hadoop</groupId>
819           <artifactId>hadoop-minicluster</artifactId>
820           <scope>test</scope>
821         </dependency>
822         <!-- Hadoop needs Netty 3.x at test scope for the minicluster>
823         <dependency>
824           <groupId>io.netty</groupId>
825           <artifactId>netty</artifactId>
826           <version>${netty.hadoop.version}</version>
827           <scope>test</scope>
828         </dependency-->
829       </dependencies>
830       <build>
831         <plugins>
832           <plugin>
833             <artifactId>maven-dependency-plugin</artifactId>
834             <executions>
835               <execution>
836                 <id>create-mrapp-generated-classpath</id>
837                 <phase>generate-test-resources</phase>
838                 <goals>
839                   <goal>build-classpath</goal>
840                 </goals>
841                 <configuration>
842                   <!-- needed to run the unit test for DS to generate
843                   the required classpath that is required in the env
844                   of the launch container in the mini mr/yarn cluster
845                   -->
846                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
847                 </configuration>
848               </execution>
849             </executions>
850           </plugin>
851         </plugins>
852       </build>
853     </profile>
854   </profiles>
855 </project>