HBASE-24163 MOB compactor implementations should use format specifiers when calling...
[hbase.git] / hbase-examples / pom.xml
blob08bff98c6947e527330744a872f1aa49fef4afdb
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-examples</artifactId>
30   <name>Apache HBase - Examples</name>
31   <description>Examples of HBase usage</description>
32   <properties>
33     <!--Version of protobuf that hbase uses internally (we shade our pb)
34          Must match what is out in hbase-thirdparty include.
35     -->
36     <internal.protobuf.version>3.11.4</internal.protobuf.version>
37   </properties>
38   <build>
39     <plugins>
40       <plugin>
41         <!--Make it so assembly:single does nothing in here-->
42         <artifactId>maven-assembly-plugin</artifactId>
43         <configuration>
44           <skipAssembly>true</skipAssembly>
45         </configuration>
46       </plugin>
47       <plugin>
48         <artifactId>maven-surefire-plugin</artifactId>
49         <configuration>
50           <!-- Have to set the groups here because we only do
51                     split tests in this package, so groups on live in this module -->
52           <groups>${surefire.firstPartGroups}</groups>
53         </configuration>
54       </plugin>
55       <!-- Make a jar and put the sources in the jar -->
56       <plugin>
57         <groupId>org.apache.maven.plugins</groupId>
58         <artifactId>maven-source-plugin</artifactId>
59       </plugin>
60       <plugin>
61         <groupId>org.xolstice.maven.plugins</groupId>
62         <artifactId>protobuf-maven-plugin</artifactId>
63         <executions>
64           <execution>
65             <id>compile-protoc</id>
66             <phase>generate-sources</phase>
67             <goals>
68               <goal>compile</goal>
69             </goals>
70             <configuration>
71               <protocArtifact>com.google.protobuf:protoc:${internal.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
72               <checkStaleness>true</checkStaleness>
73             </configuration>
74           </execution>
75         </executions>
76       </plugin>
77       <plugin>
78         <groupId>com.google.code.maven-replacer-plugin</groupId>
79         <artifactId>replacer</artifactId>
80         <version>1.5.3</version>
81         <executions>
82           <execution>
83             <phase>process-sources</phase>
84             <goals>
85               <goal>replace</goal>
86             </goals>
87           </execution>
88         </executions>
89         <configuration>
90           <basedir>${basedir}/target/generated-sources/</basedir>
91             <includes>
92               <include>**/*.java</include>
93             </includes>
94             <!-- Ignore errors when missing files, because it means this build
95                  was run with -Dprotoc.skip and there is no -Dreplacer.skip -->
96             <ignoreErrors>true</ignoreErrors>
97             <replacements>
98               <replacement>
99                 <token>([^\.])com.google.protobuf</token>
100                 <value>$1org.apache.hbase.thirdparty.com.google.protobuf</value>
101               </replacement>
102               <replacement>
103                 <token>(public)(\W+static)?(\W+final)?(\W+class)</token>
104                 <value>@javax.annotation.Generated("proto") $1$2$3$4</value>
105               </replacement>
106               <!-- replacer doesn't support anchoring or negative lookbehind -->
107               <replacement>
108                 <token>(@javax.annotation.Generated\("proto"\) ){2}</token>
109                 <value>$1</value>
110               </replacement>
111             </replacements>
112         </configuration>
113       </plugin>
114       <plugin>
115         <groupId>net.revelc.code</groupId>
116         <artifactId>warbucks-maven-plugin</artifactId>
117       </plugin>
118       <plugin>
119         <groupId>org.apache.maven.plugins</groupId>
120         <artifactId>maven-checkstyle-plugin</artifactId>
121         <configuration>
122           <failOnViolation>true</failOnViolation>
123         </configuration>
124       </plugin>
125     </plugins>
126   </build>
127   <dependencies>
128     <dependency>
129       <groupId>org.apache.hbase.thirdparty</groupId>
130       <artifactId>hbase-shaded-miscellaneous</artifactId>
131     </dependency>
132     <dependency>
133       <groupId>org.apache.hbase.thirdparty</groupId>
134       <artifactId>hbase-shaded-netty</artifactId>
135     </dependency>
136     <dependency>
137       <groupId>org.apache.hbase</groupId>
138       <artifactId>hbase-protocol-shaded</artifactId>
139     </dependency>
140     <dependency>
141       <groupId>org.apache.hbase</groupId>
142       <artifactId>hbase-common</artifactId>
143     </dependency>
144     <dependency>
145       <groupId>org.apache.hbase</groupId>
146       <artifactId>hbase-client</artifactId>
147     </dependency>
148     <dependency>
149       <groupId>org.apache.hbase</groupId>
150       <artifactId>hbase-server</artifactId>
151     </dependency>
152     <dependency>
153       <groupId>org.apache.hbase</groupId>
154       <artifactId>hbase-mapreduce</artifactId>
155     </dependency>
156     <dependency>
157       <groupId>org.apache.hbase</groupId>
158       <artifactId>hbase-endpoint</artifactId>
159     </dependency>
160     <dependency>
161       <groupId>org.apache.hbase</groupId>
162       <artifactId>hbase-thrift</artifactId>
163     </dependency>
164     <dependency>
165       <groupId>org.apache.hbase</groupId>
166       <artifactId>hbase-metrics-api</artifactId>
167     </dependency>
168     <dependency>
169       <groupId>org.apache.hbase</groupId>
170       <artifactId>hbase-testing-util</artifactId>
171       <scope>test</scope>
172     </dependency>
173     <dependency>
174       <groupId>org.apache.thrift</groupId>
175       <artifactId>libthrift</artifactId>
176     </dependency>
177     <dependency>
178       <groupId>commons-io</groupId>
179       <artifactId>commons-io</artifactId>
180     </dependency>
181     <dependency>
182       <groupId>org.slf4j</groupId>
183       <artifactId>slf4j-api</artifactId>
184     </dependency>
185     <dependency>
186       <groupId>org.apache.zookeeper</groupId>
187       <artifactId>zookeeper</artifactId>
188     </dependency>
189     <dependency>
190       <groupId>com.google.protobuf</groupId>
191       <artifactId>protobuf-java</artifactId>
192     </dependency>
193     <dependency>
194       <groupId>org.apache.curator</groupId>
195       <artifactId>curator-framework</artifactId>
196     </dependency>
197     <dependency>
198       <groupId>org.apache.curator</groupId>
199       <artifactId>curator-client</artifactId>
200     </dependency>
201     <dependency>
202       <groupId>org.apache.curator</groupId>
203       <artifactId>curator-recipes</artifactId>
204     </dependency>
205     <dependency>
206       <groupId>com.github.stephenc.findbugs</groupId>
207       <artifactId>findbugs-annotations</artifactId>
208       <scope>compile</scope>
209       <optional>true</optional>
210     </dependency>
211     <dependency>
212       <groupId>org.apache.hbase</groupId>
213       <artifactId>hbase-rest</artifactId>
214     </dependency>
215     <dependency>
216       <groupId>junit</groupId>
217       <artifactId>junit</artifactId>
218       <scope>test</scope>
219     </dependency>
220     <dependency>
221       <groupId>org.mockito</groupId>
222       <artifactId>mockito-core</artifactId>
223       <scope>test</scope>
224     </dependency>
225     <dependency>
226       <groupId>org.apache.hadoop</groupId>
227       <artifactId>hadoop-minikdc</artifactId>
228       <scope>test</scope>
229       <exclusions>
230         <exclusion>
231           <groupId>bouncycastle</groupId>
232           <artifactId>bcprov-jdk15</artifactId>
233         </exclusion>
234       </exclusions>
235     </dependency>
236     <dependency>
237       <groupId>org.bouncycastle</groupId>
238       <artifactId>bcprov-jdk15on</artifactId>
239       <scope>test</scope>
240     </dependency>
241     <dependency>
242       <groupId>org.apache.hbase</groupId>
243       <artifactId>hbase-http</artifactId>
244       <scope>test</scope>
245       <type>test-jar</type>
246     </dependency>
247   </dependencies>
248   <profiles>
249     <!-- Skip the tests in this module -->
250     <profile>
251       <id>skipExamplesTests</id>
252       <activation>
253         <property>
254           <name>skipExamplesTests</name>
255         </property>
256       </activation>
257       <properties>
258         <surefire.skipFirstPart>true</surefire.skipFirstPart>
259         <surefire.skipSecondPart>true</surefire.skipSecondPart>
260       </properties>
261     </profile>
262     <!-- Profiles for building against different hadoop versions -->
263     <!-- There are a lot of common dependencies used here, should investigate
264          if we can combine these profiles somehow -->
265     <!-- profile for building against Hadoop 2.x.  This is the default -->
266     <profile>
267       <id>hadoop-2.0</id>
268       <activation>
269         <property>
270           <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
271           <!--h2-->
272           <name>!hadoop.profile</name>
273         </property>
274       </activation>
275       <dependencies>
276         <dependency>
277           <groupId>org.apache.hadoop</groupId>
278           <artifactId>hadoop-mapreduce-client-core</artifactId>
279         </dependency>
280         <dependency>
281           <groupId>org.apache.hadoop</groupId>
282           <artifactId>hadoop-common</artifactId>
283         </dependency>
284       </dependencies>
285       <build>
286         <plugins>
287           <plugin>
288             <artifactId>maven-dependency-plugin</artifactId>
289             <executions>
290               <execution>
291                 <id>create-mrapp-generated-classpath</id>
292                 <phase>generate-test-resources</phase>
293                 <goals>
294                   <goal>build-classpath</goal>
295                 </goals>
296                 <configuration>
297                   <!-- needed to run the unit test for DS to generate
298                                  the required classpath that is required in the env
299                                  of the launch container in the mini mr/yarn cluster
300                                  -->
301                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
302                 </configuration>
303               </execution>
304             </executions>
305           </plugin>
306         </plugins>
307       </build>
308     </profile>
309     <!--
310        profile for building against Hadoop 3.0.x. Activate using:
311         mvn -Dhadoop.profile=3.0
312      -->
313     <profile>
314       <id>hadoop-3.0</id>
315       <activation>
316         <property>
317           <name>hadoop.profile</name>
318           <value>3.0</value>
319         </property>
320       </activation>
321       <properties>
322         <hadoop.version>3.0-SNAPSHOT</hadoop.version>
323       </properties>
324       <dependencies>
325         <dependency>
326           <groupId>org.apache.hadoop</groupId>
327           <artifactId>hadoop-common</artifactId>
328         </dependency>
329         <dependency>
330           <groupId>org.apache.hadoop</groupId>
331           <artifactId>hadoop-minicluster</artifactId>
332         </dependency>
333       </dependencies>
334       <build>
335         <plugins>
336           <plugin>
337             <artifactId>maven-dependency-plugin</artifactId>
338             <executions>
339               <execution>
340                 <id>create-mrapp-generated-classpath</id>
341                 <phase>generate-test-resources</phase>
342                 <goals>
343                   <goal>build-classpath</goal>
344                 </goals>
345                 <configuration>
346                   <!-- needed to run the unit test for DS to generate
347                                  the required classpath that is required in the env
348                                  of the launch container in the mini mr/yarn cluster
349                                  -->
350                   <outputFile>${project.build.directory}/test-classes/mrapp-generated-classpath</outputFile>
351                 </configuration>
352               </execution>
353             </executions>
354           </plugin>
355         </plugins>
356       </build>
357     </profile>
358     <profile>
359       <id>eclipse-specific</id>
360       <activation>
361         <property>
362           <name>m2e.version</name>
363         </property>
364       </activation>
365       <build>
366         <pluginManagement>
367           <plugins>
368             <!--This plugin's configuration is used to store Eclipse m2e settings
369                  only. It has no influence on the Maven build itself.-->
370             <plugin>
371               <groupId>org.eclipse.m2e</groupId>
372               <artifactId>lifecycle-mapping</artifactId>
373               <configuration>
374                 <lifecycleMappingMetadata>
375                   <pluginExecutions>
376                     <pluginExecution>
377                       <pluginExecutionFilter>
378                         <groupId>org.apache.maven.plugins</groupId>
379                         <artifactId>maven-dependency-plugin</artifactId>
380                         <versionRange>[2.8,)</versionRange>
381                         <goals>
382                           <goal>build-classpath</goal>
383                         </goals>
384                       </pluginExecutionFilter>
385                       <action>
386                         <ignore/>
387                       </action>
388                     </pluginExecution>
389                   </pluginExecutions>
390                 </lifecycleMappingMetadata>
391               </configuration>
392             </plugin>
393           </plugins>
394         </pluginManagement>
395       </build>
396     </profile>
397   </profiles>
398 </project>