HBASE-20332 shaded mapreduce module shouldn't include hadoop
[hbase.git] / hbase-shaded / hbase-shaded-mapreduce / pom.xml
blobedc80cd1516f658dd22f5bfc3ac7d9646aef6955
1 <project xmlns="http://maven.apache.org/POM/4.0.0"
2          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4     <!--
5       /**
6        * Licensed to the Apache Software Foundation (ASF) under one
7        * or more contributor license agreements.  See the NOTICE file
8        * distributed with this work for additional information
9        * regarding copyright ownership.  The ASF licenses this file
10        * to you under the Apache License, Version 2.0 (the
11        * "License"); you may not use this file except in compliance
12        * with the License.  You may obtain a copy of the License at
13        *
14        *     http://www.apache.org/licenses/LICENSE-2.0
15        *
16        * Unless required by applicable law or agreed to in writing, software
17        * distributed under the License is distributed on an "AS IS" BASIS,
18        * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19        * See the License for the specific language governing permissions and
20        * limitations under the License.
21        */
22       -->
23     <modelVersion>4.0.0</modelVersion>
24     <parent>
25         <artifactId>hbase-shaded</artifactId>
26         <groupId>org.apache.hbase</groupId>
27         <version>3.0.0-SNAPSHOT</version>
28         <relativePath>..</relativePath>
29     </parent>
30     <artifactId>hbase-shaded-mapreduce</artifactId>
31     <name>Apache HBase - Shaded - MapReduce</name>
32     <build>
33         <plugins>
34             <plugin>
35                 <groupId>org.apache.maven.plugins</groupId>
36                 <artifactId>maven-site-plugin</artifactId>
37                 <configuration>
38                     <skip>true</skip>
39                 </configuration>
40             </plugin>
41             <plugin>
42                 <!--Make it so assembly:single does nothing in here-->
43                 <artifactId>maven-assembly-plugin</artifactId>
44                 <configuration>
45                     <skipAssembly>true</skipAssembly>
46                 </configuration>
47             </plugin>
48             <plugin>
49                 <groupId>org.apache.maven.plugins</groupId>
50                 <artifactId>maven-jar-plugin</artifactId>
51                 <configuration>
52                     <archive>
53                         <manifest>
54                             <!--Include the Driver class as the 'main'.
55                                  Executing the jar will then show a list of the basic MR jobs.
56                                  -->
57                             <mainClass>org/apache/hadoop/hbase/mapreduce/Driver</mainClass>
58                         </manifest>
59                     </archive>
60                 </configuration>
61             </plugin>
62         </plugins>
63     </build>
64     <dependencies>
65         <!--
66              We want to ensure needed hadoop bits are at provided scope for our shaded
67              artifact, so we list them below in hadoop specific profiles.
68           -->
69         <dependency>
70             <groupId>org.apache.hbase</groupId>
71             <artifactId>hbase-mapreduce</artifactId>
72             <exclusions>
73               <!-- Jaxb-api is a part of Java SE now -->
74               <exclusion>
75                 <groupId>javax.xml.bind</groupId>
76                 <artifactId>jaxb-api</artifactId>
77               </exclusion>
78               <!-- Jersey not used by our MR support -->
79               <exclusion>
80                 <groupId>javax.ws.rs</groupId>
81                 <artifactId>javax.ws.rs-api</artifactId>
82               </exclusion>
83               <exclusion>
84                 <groupId>com.sun.jersey</groupId>
85                 <artifactId>jersey-server</artifactId>
86               </exclusion>
87               <exclusion>
88                 <groupId>com.sun.jersey</groupId>
89                 <artifactId>jersey-client</artifactId>
90               </exclusion>
91               <exclusion>
92                 <groupId>com.sun.jersey</groupId>
93                 <artifactId>jersey-core</artifactId>
94               </exclusion>
95               <exclusion>
96                 <groupId>com.sun.jersey</groupId>
97                 <artifactId>jersey-json</artifactId>
98               </exclusion>
99               <exclusion>
100                 <groupId>com.sun.jersey.contribs</groupId>
101                 <artifactId>jersey-guice</artifactId>
102               </exclusion>
103               <!-- Jetty not used by our MR support -->
104               <exclusion>
105                 <groupId>javax.servlet</groupId>
106                 <artifactId>javax.servlet-api</artifactId>
107               </exclusion>
108               <exclusion>
109                 <groupId>org.eclipse.jetty</groupId>
110                 <artifactId>jetty-http</artifactId>
111               </exclusion>
112               <exclusion>
113                 <groupId>org.eclipse.jetty</groupId>
114                 <artifactId>jetty-security</artifactId>
115               </exclusion>
116               <exclusion>
117                 <groupId>org.eclipse.jetty</groupId>
118                 <artifactId>jetty-server</artifactId>
119               </exclusion>
120               <exclusion>
121                 <groupId>org.eclipse.jetty</groupId>
122                 <artifactId>jetty-servlet</artifactId>
123               </exclusion>
124               <exclusion>
125                 <groupId>org.eclipse.jetty</groupId>
126                 <artifactId>jetty-util</artifactId>
127               </exclusion>
128               <exclusion>
129                 <groupId>org.eclipse.jetty</groupId>
130                 <artifactId>jetty-util-ajax</artifactId>
131               </exclusion>
132               <exclusion>
133                 <groupId>org.eclipse.jetty</groupId>
134                 <artifactId>jetty-jsp</artifactId>
135               </exclusion>
136               <exclusion>
137                 <groupId>org.glassfish</groupId>
138                 <artifactId>javax.el</artifactId>
139               </exclusion>
140               <exclusion>
141                 <groupId>org.eclipse.jetty</groupId>
142                 <artifactId>jetty-webapp</artifactId>
143               </exclusion>
144               <exclusion>
145                 <groupId>org.glassfish.jersey.core</groupId>
146                 <artifactId>jersey-server</artifactId>
147               </exclusion>
148               <exclusion>
149                 <groupId>org.glassfish.jersey.containers</groupId>
150                 <artifactId>jersey-container-servlet-core</artifactId>
151               </exclusion>
152               <!-- We excluded the server-side generated classes for JSP, so exclude
153                    their runtime support libraries too
154                 -->
155               <exclusion>
156                 <groupId>org.glassfish.web</groupId>
157                 <artifactId>javax.servlet.jsp</artifactId>
158               </exclusion>
159               <exclusion>
160                 <groupId>javax.servlet.jsp</groupId>
161                 <artifactId>javax.servlet.jsp-api</artifactId>
162               </exclusion>
163             </exclusions>
164         </dependency>
165     </dependencies>
167     <profiles>
168         <profile>
169             <id>release</id>
170             <build>
171                 <plugins>
172                 <!-- Tell the shade plugin we want to leave Hadoop as a dependency -->
173                 <plugin>
174                     <groupId>org.apache.maven.plugins</groupId>
175                     <artifactId>maven-shade-plugin</artifactId>
176                     <executions>
177                         <execution>
178                             <id>aggregate-into-a-jar-with-relocated-third-parties</id>
179                             <configuration>
180                                 <artifactSet>
181                                     <excludes>
182                                         <exclude>org.apache.hadoop:*</exclude>
183                                         <!-- The rest of these should be kept in sync with the parent pom -->
184                                         <exclude>org.apache.hbase:hbase-resource-bundle</exclude>
185                                         <exclude>org.slf4j:*</exclude>
186                                         <exclude>com.google.code.findbugs:*</exclude>
187                                         <exclude>com.github.stephenc.findbugs:*</exclude>
188                                         <exclude>org.apache.htrace:*</exclude>
189                                         <exclude>org.apache.yetus:*</exclude>
190                                         <exclude>log4j:*</exclude>
191                                         <exclude>commons-logging:*</exclude>
192                                     </excludes>
193                                 </artifactSet>
194                             </configuration>
195                         </execution>
196                     </executions>
197                 </plugin>
198                 </plugins>
199             </build>
200         </profile>
201         <!-- These hadoop profiles should be derived from those in the hbase-mapreduce
202              module. Essentially, you must list the same hadoop-* dependencies
203              since provided dependencies are not transitively included.
204         -->
205         <!-- profile against Hadoop 2.x: This is the default. -->
206         <profile>
207           <id>hadoop-2.0</id>
208           <activation>
209             <property>
210                 <!--Below formatting for dev-support/generate-hadoopX-poms.sh-->
211                 <!--h2--><name>!hadoop.profile</name>
212             </property>
213           </activation>
214           <dependencies>
215             <dependency>
216               <groupId>org.apache.hadoop</groupId>
217               <artifactId>hadoop-common</artifactId>
218               <scope>provided</scope>
219               <exclusions>
220                 <exclusion>
221                   <groupId>net.java.dev.jets3t</groupId>
222                   <artifactId>jets3t</artifactId>
223                 </exclusion>
224                 <exclusion>
225                   <groupId>javax.servlet.jsp</groupId>
226                   <artifactId>jsp-api</artifactId>
227                 </exclusion>
228                 <exclusion>
229                   <groupId>org.mortbay.jetty</groupId>
230                   <artifactId>jetty</artifactId>
231                 </exclusion>
232                 <exclusion>
233                   <groupId>com.sun.jersey</groupId>
234                   <artifactId>jersey-server</artifactId>
235                 </exclusion>
236                 <exclusion>
237                   <groupId>com.sun.jersey</groupId>
238                   <artifactId>jersey-core</artifactId>
239                 </exclusion>
240                 <exclusion>
241                   <groupId>com.sun.jersey</groupId>
242                   <artifactId>jersey-json</artifactId>
243                 </exclusion>
244                 <exclusion>
245                   <groupId>javax.servlet</groupId>
246                   <artifactId>servlet-api</artifactId>
247                 </exclusion>
248                 <exclusion>
249                   <groupId>tomcat</groupId>
250                   <artifactId>jasper-compiler</artifactId>
251                 </exclusion>
252                 <exclusion>
253                   <groupId>tomcat</groupId>
254                   <artifactId>jasper-runtime</artifactId>
255                 </exclusion>
256                 <exclusion>
257                   <groupId>com.google.code.findbugs</groupId>
258                   <artifactId>jsr305</artifactId>
259                 </exclusion>
260               </exclusions>
261             </dependency>
262             <dependency>
263               <groupId>org.apache.hadoop</groupId>
264               <artifactId>hadoop-hdfs</artifactId>
265               <scope>provided</scope>
266               <exclusions>
267                 <exclusion>
268                   <groupId>javax.servlet.jsp</groupId>
269                   <artifactId>jsp-api</artifactId>
270                 </exclusion>
271                 <exclusion>
272                   <groupId>javax.servlet</groupId>
273                   <artifactId>servlet-api</artifactId>
274                 </exclusion>
275                 <exclusion>
276                   <groupId>io.netty</groupId>
277                   <artifactId>netty</artifactId>
278                 </exclusion>
279                 <exclusion>
280                   <groupId>stax</groupId>
281                   <artifactId>stax-api</artifactId>
282                 </exclusion>
283                 <exclusion>
284                   <groupId>xerces</groupId>
285                   <artifactId>xercesImpl</artifactId>
286                 </exclusion>
287               </exclusions>
288               <version>${hadoop-two.version}</version>
289             </dependency>
290             <dependency>
291               <groupId>org.apache.hadoop</groupId>
292               <artifactId>hadoop-mapreduce-client-core</artifactId>
293               <scope>provided</scope>
294               <exclusions>
295                 <exclusion>
296                   <groupId>com.google.guava</groupId>
297                   <artifactId>guava</artifactId>
298                 </exclusion>
299               </exclusions>
300             </dependency>
301             <dependency>
302               <groupId>org.apache.hadoop</groupId>
303               <artifactId>hadoop-auth</artifactId>
304               <scope>provided</scope>
305             </dependency>
306           </dependencies>
307         </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>${hadoop-three.version}</hadoop.version>
323           </properties>
324           <dependencies>
325             <dependency>
326               <groupId>org.apache.hadoop</groupId>
327               <artifactId>hadoop-common</artifactId>
328               <scope>provided</scope>
329             </dependency>
330             <dependency>
331               <groupId>org.apache.hadoop</groupId>
332               <artifactId>hadoop-hdfs</artifactId>
333               <scope>provided</scope>
334             </dependency>
335             <dependency>
336               <groupId>org.apache.hadoop</groupId>
337               <artifactId>hadoop-auth</artifactId>
338               <scope>provided</scope>
339             </dependency>
340           </dependencies>
341         </profile>
342     </profiles>
343 </project>