HBASE-24045 Support setting `-Dhadoop.profile` in adhoc_run_tests.sh ADDENDUM
[hbase.git] / hbase-zookeeper / pom.xml
blob198e13a432523fc04b90266cba4dc283581d329e
1 <?xml version="1.0"?>
2 <project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://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   <modelVersion>4.0.0</modelVersion>
23   <parent>
24     <artifactId>hbase-build-configuration</artifactId>
25     <groupId>org.apache.hbase</groupId>
26     <version>3.0.0-SNAPSHOT</version>
27     <relativePath>../hbase-build-configuration</relativePath>
28   </parent>
29   <artifactId>hbase-zookeeper</artifactId>
30   <name>Apache HBase - Zookeeper</name>
31   <description>Zookeeper Helpers for HBase</description>
33   <build>
34     <!-- Makes sure the resources get added before they are processed
35       by placing this first -->
36     <testResources>
37       <!-- Our test artifact has different license info than our source/bin ones -->
38       <testResource>
39         <directory>src/test/resources/META-INF/</directory>
40         <targetPath>META-INF/</targetPath>
41         <includes>
42           <include>NOTICE</include>
43         </includes>
44         <filtering>true</filtering>
45       </testResource>
46       <testResource>
47         <directory>src/test/resources</directory>
48         <includes>
49           <include>**/**</include>
50         </includes>
51       </testResource>
52     </testResources>
53     <plugins>
54       <!-- Run with -Dmaven.test.skip.exec=true to build -tests.jar without running
55         tests (this is needed for upstream projects whose tests need this jar simply for
56         compilation) -->
57       <plugin>
58         <!--Make it so assembly:single does nothing in here-->
59         <artifactId>maven-assembly-plugin</artifactId>
60         <configuration>
61           <skipAssembly>true</skipAssembly>
62         </configuration>
63       </plugin>
64       <plugin>
65         <groupId>org.apache.maven.plugins</groupId>
66         <artifactId>maven-checkstyle-plugin</artifactId>
67         <configuration>
68           <failOnViolation>true</failOnViolation>
69         </configuration>
70       </plugin>
71       <plugin>
72         <groupId>net.revelc.code</groupId>
73         <artifactId>warbucks-maven-plugin</artifactId>
74       </plugin>
75     </plugins>
76   </build>
77   <dependencies>
78     <dependency>
79       <groupId>org.apache.hbase.thirdparty</groupId>
80       <artifactId>hbase-shaded-protobuf</artifactId>
81     </dependency>
82     <dependency>
83       <groupId>org.apache.hbase.thirdparty</groupId>
84       <artifactId>hbase-shaded-miscellaneous</artifactId>
85     </dependency>
86     <!-- Intra-project dependencies -->
87     <dependency>
88       <groupId>org.apache.hbase</groupId>
89       <artifactId>hbase-common</artifactId>
90     </dependency>
91     <dependency>
92       <groupId>org.apache.hbase</groupId>
93       <artifactId>hbase-common</artifactId>
94       <type>test-jar</type>
95       <scope>test</scope>
96     </dependency>
97     <dependency>
98       <groupId>org.apache.hbase</groupId>
99       <artifactId>hbase-client</artifactId>
100     </dependency>
101     <dependency>
102       <groupId>org.apache.hbase</groupId>
103       <artifactId>hbase-annotations</artifactId>
104       <type>test-jar</type>
105       <scope>test</scope>
106     </dependency>
107     <dependency>
108       <groupId>org.apache.hbase</groupId>
109       <artifactId>hbase-protocol-shaded</artifactId>
110     </dependency>
111     <dependency>
112       <groupId>org.apache.hbase</groupId>
113       <artifactId>hbase-hadoop-compat</artifactId>
114     </dependency>
115     <dependency>
116       <groupId>org.apache.hbase</groupId>
117       <artifactId>hbase-hadoop2-compat</artifactId>
118       <exclusions>
119         <!-- We don't need MR support classes here. -->
120         <exclusion>
121           <groupId>org.apache.hadoop</groupId>
122           <artifactId>hadoop-mapreduce-client-core</artifactId>
123         </exclusion>
124       </exclusions>
125     </dependency>
126     <!-- General dependencies -->
127     <dependency>
128       <groupId>com.github.stephenc.findbugs</groupId>
129       <artifactId>findbugs-annotations</artifactId>
130       <scope>compile</scope>
131       <optional>true</optional>
132     </dependency>
133     <dependency>
134       <groupId>org.apache.commons</groupId>
135       <artifactId>commons-lang3</artifactId>
136     </dependency>
137     <dependency>
138       <groupId>org.slf4j</groupId>
139       <artifactId>slf4j-api</artifactId>
140     </dependency>
141     <dependency>
142       <groupId>log4j</groupId>
143       <artifactId>log4j</artifactId>
144     </dependency>
145     <dependency>
146       <groupId>org.apache.zookeeper</groupId>
147       <artifactId>zookeeper</artifactId>
148     </dependency>
149     <!-- Test dependencies -->
150     <dependency>
151       <groupId>junit</groupId>
152       <artifactId>junit</artifactId>
153       <scope>test</scope>
154     </dependency>
155     <dependency>
156       <groupId>org.mockito</groupId>
157       <artifactId>mockito-core</artifactId>
158       <scope>test</scope>
159     </dependency>
160   </dependencies>
161   <profiles>
162     <!-- Needs to make the profile in apache parent pom -->
163     <profile>
164       <id>apache-release</id>
165       <build>
166         <plugins>
167           <plugin>
168             <groupId>org.apache.maven.plugins</groupId>
169             <artifactId>maven-resources-plugin</artifactId>
170             <executions>
171               <execution>
172                 <id>license-javadocs</id>
173                 <phase>prepare-package</phase>
174                 <goals>
175                   <goal>copy-resources</goal>
176                 </goals>
177                 <configuration>
178                   <outputDirectory>${project.build.directory}/apidocs</outputDirectory>
179                   <resources>
180                     <resource>
181                       <directory>src/main/javadoc/META-INF/</directory>
182                       <targetPath>META-INF/</targetPath>
183                       <includes>
184                         <include>LICENSE</include>
185                         <include>NOTICE</include>
186                       </includes>
187                       <filtering>true</filtering>
188                     </resource>
189                   </resources>
190                 </configuration>
191               </execution>
192             </executions>
193           </plugin>
194         </plugins>
195       </build>
196     </profile>
197     <!-- Skip the tests in this module -->
198     <profile>
199       <id>skipZooKeeperTests</id>
200       <activation>
201         <property>
202           <name>skipZooKeeperTests</name>
203         </property>
204       </activation>
205       <properties>
206         <surefire.skipFirstPart>true</surefire.skipFirstPart>
207         <surefire.skipSecondPart>true</surefire.skipSecondPart>
208       </properties>
209     </profile>
210     <!-- Profiles for building against different hadoop versions -->
211     <!-- There are a lot of common dependencies used here, should investigate
212     if we can combine these profiles somehow -->
214     <!-- profile for building against Hadoop 2.x.  This is the default.  -->
215     <profile>
216       <id>hadoop-2.0</id>
217       <activation>
218         <property>
219             <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
220             <!--h2--><name>!hadoop.profile</name>
221         </property>
222       </activation>
223       <dependencies>
224         <dependency>
225           <groupId>org.apache.hadoop</groupId>
226           <artifactId>hadoop-common</artifactId>
227         </dependency>
228         <dependency>
229           <groupId>org.apache.hadoop</groupId>
230           <artifactId>hadoop-auth</artifactId>
231         </dependency>
232       </dependencies>
233       <build>
234         <plugins>
235           <plugin>
236             <artifactId>maven-dependency-plugin</artifactId>
237             <executions>
238               <execution>
239                 <id>create-mrapp-generated-classpath</id>
240                 <phase>generate-test-resources</phase>
241                 <goals>
242                   <goal>build-classpath</goal>
243                 </goals>
244                 <configuration>
245                   <!-- needed to run the unit test for DS to generate
246                   the required classpath that is required in the env
247                   of the launch container in the mini mr/yarn cluster
248                   -->
249                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
250                 </configuration>
251               </execution>
252             </executions>
253           </plugin>
254         </plugins>
255       </build>
256     </profile>
257     <!--
258       profile for building against Hadoop 3.0.x. Activate using:
259        mvn -Dhadoop.profile=3.0
260     -->
261     <profile>
262       <id>hadoop-3.0</id>
263       <activation>
264         <property>
265           <name>hadoop.profile</name>
266           <value>3.0</value>
267         </property>
268       </activation>
269       <dependencies>
270         <dependency>
271           <groupId>org.apache.hadoop</groupId>
272           <artifactId>hadoop-common</artifactId>
273         </dependency>
274         <dependency>
275           <groupId>org.apache.hadoop</groupId>
276           <artifactId>hadoop-auth</artifactId>
277         </dependency>
278       </dependencies>
279       <build>
280         <plugins>
281           <plugin>
282             <artifactId>maven-dependency-plugin</artifactId>
283             <executions>
284               <execution>
285                 <id>create-mrapp-generated-classpath</id>
286                 <phase>generate-test-resources</phase>
287                 <goals>
288                   <goal>build-classpath</goal>
289                 </goals>
290                 <configuration>
291                   <!-- needed to run the unit test for DS to generate
292                   the required classpath that is required in the env
293                   of the launch container in the mini mr/yarn cluster
294                   -->
295                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
296                 </configuration>
297               </execution>
298             </executions>
299           </plugin>
300         </plugins>
301       </build>
302     </profile>
303     <profile>
304       <id>eclipse-specific</id>
305       <activation>
306         <property>
307           <name>m2e.version</name>
308         </property>
309       </activation>
310       <build>
311         <plugins>
312           <plugin>
313             <groupId>org.apache.maven.plugins</groupId>
314             <artifactId>maven-eclipse-plugin</artifactId>
315             <configuration>
316               <additionalProjectnatures>
317                 <projectnature>org.jamon.project.jamonnature</projectnature>
318               </additionalProjectnatures>
319               <buildcommands>
320                 <buildcommand>org.jamon.project.templateBuilder</buildcommand>
321                 <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
322                 <buildcommand>org.jamon.project.markerUpdater</buildcommand>
323               </buildcommands>
324               <additionalConfig>
325                 <file>
326                   <name>.settings/org.jamon.prefs</name>
327                   <content># now
328                     eclipse.preferences.version=1
329                     templateSourceDir=src/main/jamon
330                     templateOutputDir=target/generated-jamon
331                   </content>
332                 </file>
333               </additionalConfig>
334             </configuration>
335           </plugin>
336         </plugins>
337         <pluginManagement>
338            <plugins>
339              <!--This plugin's configuration is used to store Eclipse m2e settings
340                  only. It has no influence on the Maven build itself and needs to
341                  be kept in plugin management, not in the actual plugins. -->
342             <plugin>
343               <groupId>org.eclipse.m2e</groupId>
344               <artifactId>lifecycle-mapping</artifactId>
345               <configuration>
346                 <lifecycleMappingMetadata>
347                   <pluginExecutions>
348                     <pluginExecution>
349                       <pluginExecutionFilter>
350                         <groupId>org.apache.maven.plugins</groupId>
351                         <artifactId>maven-antrun-plugin</artifactId>
352                         <versionRange>[1.6,)</versionRange>
353                         <goals>
354                           <goal>run</goal>
355                         </goals>
356                       </pluginExecutionFilter>
357                       <action>
358                         <execute>
359                           <runOnIncremental>false</runOnIncremental>
360                           <runOnConfiguration>true</runOnConfiguration>
361                         </execute>
362                       </action>
363                     </pluginExecution>
364                     <pluginExecution>
365                       <pluginExecutionFilter>
366                         <groupId>org.apache.maven.plugins</groupId>
367                         <artifactId>maven-dependency-plugin</artifactId>
368                         <versionRange>[2.8,)</versionRange>
369                         <goals>
370                           <goal>build-classpath</goal>
371                         </goals>
372                       </pluginExecutionFilter>
373                       <action>
374                         <ignore></ignore>
375                       </action>
376                     </pluginExecution>
377                   </pluginExecutions>
378                 </lifecycleMappingMetadata>
379               </configuration>
380             </plugin>
381           </plugins>
382         </pluginManagement>
383       </build>
384     </profile>
385   </profiles>
386 </project>