HBASE-20615 emphasize shaded artifacts in client tarball.
[hbase.git] / hbase-assembly / src / main / assembly / hadoop-two-compat.xml
blob72437839df4710ff483d6b20130d2655229f2abb
1 <?xml version="1.0"?>
2 <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.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 -->
23   <!--This 'all' id is not appended to the produced bundle because we do this: http://maven.apache.org/plugins/maven-assembly-plugin/faq.html#required-classifiers -->
24   <id>bin</id>
25   <formats>
26     <format>tar.gz</format>
27   </formats>
28   <componentDescriptors>
29     <componentDescriptor>src/main/assembly/components.xml</componentDescriptor>
30   </componentDescriptors>
31   <moduleSets>
32     <moduleSet>
33       <useAllReactorProjects>true</useAllReactorProjects>
34       <includes>
35         <!-- Keep this list sorted by name -->
36         <include>org.apache.hbase:hbase-annotations</include>
37         <include>org.apache.hbase:hbase-backup</include>
38         <include>org.apache.hbase:hbase-client</include>
39         <include>org.apache.hbase:hbase-common</include>
40         <include>org.apache.hbase:hbase-endpoint</include>
41         <include>org.apache.hbase:hbase-examples</include>
42         <include>org.apache.hbase:hbase-external-blockcache</include>
43         <include>org.apache.hbase:hbase-hadoop-compat</include>
44         <include>org.apache.hbase:hbase-hadoop2-compat</include>
45         <include>org.apache.hbase:hbase-http</include>
46         <include>org.apache.hbase:hbase-it</include>
47         <include>org.apache.hbase:hbase-mapreduce</include>
48         <include>org.apache.hbase:hbase-metrics</include>
49         <include>org.apache.hbase:hbase-metrics-api</include>
50         <include>org.apache.hbase:hbase-procedure</include>
51         <include>org.apache.hbase:hbase-protocol</include>
52         <include>org.apache.hbase:hbase-protocol-shaded</include>
53         <include>org.apache.hbase:hbase-replication</include>
54         <include>org.apache.hbase:hbase-rest</include>
55         <include>org.apache.hbase:hbase-rsgroup</include>
56         <include>org.apache.hbase:hbase-server</include>
57         <include>org.apache.hbase:hbase-shell</include>
58         <include>org.apache.hbase:hbase-spark</include>
59         <include>org.apache.hbase:hbase-spark-it</include>
60         <include>org.apache.hbase:hbase-testing-util</include>
61         <include>org.apache.hbase:hbase-thrift</include>
62         <include>org.apache.hbase:hbase-zookeeper</include>
63       </includes>
64       <!-- Binaries for the dependencies also go in the hbase-jars directory -->
65       <binaries>
66         <outputDirectory>lib</outputDirectory>
67         <unpack>false</unpack>
68         <dependencySets>
69           <dependencySet>
70             <!-- Exclude libraries that we put in their own dirs under lib/ -->
71             <excludes>
72               <exclude>org.jruby:jruby-complete</exclude>
73               <exclude>com.sun.jersey:*</exclude>
74               <exclude>com.sun.jersey.contribs:*</exclude>
75               <exclude>jline:jline</exclude>
76         <exclude>org.apache.hbase:hbase-shaded-client</exclude>
77         <exclude>org.apache.hbase:hbase-shaded-client-byo-hadoop</exclude>
78         <exclude>org.apache.hbase:hbase-shaded-mapreduce</exclude>
79         <exclude>com.github.stephenc.findbugs:findbugs-annotations</exclude>
80         <exclude>commons-logging:commons-logging</exclude>
81         <exclude>log4j:log4j</exclude>
82         <exclude>org.apache.htrace:htrace-core4</exclude>
83         <exclude>org.apache.htrace:htrace-core</exclude>
84         <exclude>org.apache.yetus:audience-annotations</exclude>
85         <exclude>org.slf4j:slf4j-api</exclude>
86         <exclude>org.slf4j:slf4j-log4j12</exclude>
87             </excludes>
88           </dependencySet>
89         </dependencySets>
90       </binaries>
91     </moduleSet>
92     <!-- Include shaded clients in their own directory -->
93     <moduleSet>
94       <useAllReactorProjects>true</useAllReactorProjects>
95       <includes>
96         <include>org.apache.hbase:hbase-shaded-client</include>
97         <include>org.apache.hbase:hbase-shaded-mapreduce</include>
98         <include>org.apache.hbase:hbase-shaded-client-byo-hadoop</include>
99       </includes>
100       <binaries>
101         <outputDirectory>lib/shaded-clients</outputDirectory>
102         <unpack>false</unpack>
103         <dependencySets>
104           <dependencySet>
105             <includes>
106         <include>org.apache.hbase:hbase-shaded-client</include>
107         <include>org.apache.hbase:hbase-shaded-mapreduce</include>
108         <include>org.apache.hbase:hbase-shaded-client-byo-hadoop</include>
109             </includes>
110           </dependencySet>
111         </dependencySets>
112       </binaries>
113     </moduleSet>
114   </moduleSets>
115   <!-- Include the generated LICENSE and NOTICE files -->
116   <files>
117     <file>
118       <source>${project.build.directory}/maven-shared-archive-resources/META-INF/LICENSE</source>
119       <outputDirectory>.</outputDirectory>
120       <destName>LICENSE.txt</destName>
121       <lineEnding>unix</lineEnding>
122     </file>
123     <file>
124       <source>${project.build.directory}/NOTICE.aggregate</source>
125       <outputDirectory>.</outputDirectory>
126       <destName>NOTICE.txt</destName>
127       <lineEnding>unix</lineEnding>
128     </file>
129     <file>
130       <source>${basedir}/src/main/resources/META-INF/LEGAL</source>
131       <outputDirectory>.</outputDirectory>
132       <destName>LEGAL</destName>
133       <lineEnding>unix</lineEnding>
134     </file>
135   </files>
137   <dependencySets>
138     <!-- Add jruby-complete to hbase_home/lib/ruby.
139          Update JRUBY_PACKAGED_WITH_HBASE in bin/hbase and hbase.cmd if you would like to update outputDirectory below -->
140     <dependencySet>
141       <outputDirectory>lib/ruby</outputDirectory>
142       <includes>
143         <include>org.jruby:jruby-complete</include>
144       </includes>
145     </dependencySet>
146     <!-- Include third party dependencies the shaded clients expose in the lib directory
147       -->
148     <dependencySet>
149       <outputDirectory>lib/client-facing-thirdparty</outputDirectory>
150       <useTransitiveDependencies>true</useTransitiveDependencies>
151       <!-- Unfortunately, we have to whitelist these because Maven
152            currently doesn't use the dependency-reduced-pom after
153            the shaded module has done its thing. That means if we
154            did this as "transitives of the shaded modules" we'd
155            get a duplication of all the jars we already have in our
156            shaded artifacts. See MNG-5899.
158            Check that things match by listing files and making
159            sure the runtime scoped things are all present in the
160            tarball. e.g.:
162            for module in hbase-shaded-mapreduce hbase-shaded-client; do
163              mvn dependency:list -f hbase-shaded/${module}/dependency-reduced-pom.xml
164            done | \
165            grep -E "runtime|compile" | \
166            grep -v -E "junit|(optional)" | \
167            cut -d ' ' -f 3- | \
168            sort -u
170            TODO we should check this in nightly
172            Alternatively, we could
173            stop waiting for Maven to fix this and build the client
174            tarball in a different build.
175         -->
176       <includes>
177         <include>com.github.stephenc.findbugs:findbugs-annotations</include>
178         <include>commons-logging:commons-logging</include>
179         <include>log4j:log4j</include>
180         <include>org.apache.htrace:htrace-core4</include>
181         <include>org.apache.htrace:htrace-core</include>
182         <include>org.apache.yetus:audience-annotations</include>
183         <include>org.slf4j:slf4j-api</include>
184         <include>org.slf4j:slf4j-log4j12</include>
185       </includes>
186     </dependencySet>
187     <dependencySet>
188       <outputDirectory>lib/zkcli</outputDirectory>
189       <includes>
190         <include>jline:jline</include>
191       </includes>
192     </dependencySet>
193   </dependencySets>
195 </assembly>