HBASE-26649 Support meta replica LoadBalance mode for RegionLocator#getAllRegionLocat...
[hbase.git] / hbase-shaded / hbase-shaded-with-hadoop-check-invariants / pom.xml
blobf9327d569ed2df8694fa95e97eb41172e10f415c
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  Licensed under the Apache License, Version 2.0 (the "License");
4  you may not use this file except in compliance with the License.
5  You may obtain a copy of the License at
6    http://www.apache.org/licenses/LICENSE-2.0
7  Unless required by applicable law or agreed to in writing, software
8  distributed under the License is distributed on an "AS IS" BASIS,
9  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10  See the License for the specific language governing permissions and
11  limitations under the License. See accompanying LICENSE file.
12 -->
13 <project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance"
14          xsi:schemaLocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
15   <modelVersion>4.0.0</modelVersion>
16   <parent>
17     <artifactId>hbase</artifactId>
18     <groupId>org.apache.hbase</groupId>
19     <version>3.0.0-alpha-3-SNAPSHOT</version>
20     <relativePath>../..</relativePath>
21   </parent>
22   <artifactId>hbase-shaded-with-hadoop-check-invariants</artifactId>
23   <packaging>pom</packaging>
25   <description>
26   Enforces our invariants for our shaded artifacts. e.g. shaded clients have
27   a specific set of transitive dependencies and shaded clients only contain
28   classes that are in particular packages. Does the enforcement through
29   the maven-enforcer-plugin and integration test.
30   </description>
31   <name>Apache HBase Shaded Packaging Invariants (with Hadoop bundled)</name>
33   <properties>
34   </properties>
36   <dependencies>
37     <!-- This should only be client facing artifacts that bundle
38          Apache Hadoop related artifacts.
39       -->
40     <dependency>
41       <groupId>org.apache.hbase</groupId>
42       <artifactId>hbase-shaded-client</artifactId>
43     </dependency>
44     <!-- parent pom defines these for children. :( :( :( -->
45     <dependency>
46       <groupId>com.github.stephenc.findbugs</groupId>
47       <artifactId>findbugs-annotations</artifactId>
48       <scope>provided</scope>
49     </dependency>
50     <dependency>
51       <groupId>org.apache.logging.log4j</groupId>
52       <artifactId>log4j-api</artifactId>
53       <scope>provided</scope>
54     </dependency>
55     <dependency>
56       <groupId>org.apache.logging.log4j</groupId>
57       <artifactId>log4j-core</artifactId>
58       <scope>provided</scope>
59     </dependency>
60     <dependency>
61       <groupId>org.apache.logging.log4j</groupId>
62       <artifactId>log4j-slf4j-impl</artifactId>
63       <scope>provided</scope>
64     </dependency>
65     <!-- Test dependencies -->
66     <dependency>
67       <groupId>junit</groupId>
68       <artifactId>junit</artifactId>
69       <scope>provided</scope>
70     </dependency>
71     <dependency>
72       <groupId>org.mockito</groupId>
73       <artifactId>mockito-core</artifactId>
74       <scope>provided</scope>
75     </dependency>
76   </dependencies>
77   <build>
78     <plugins>
79       <plugin>
80         <groupId>org.apache.maven.plugins</groupId>
81         <artifactId>maven-site-plugin</artifactId>
82         <configuration>
83           <skip>true</skip>
84         </configuration>
85       </plugin>
86       <plugin>
87         <groupId>org.apache.maven.plugins</groupId>
88         <artifactId>maven-enforcer-plugin</artifactId>
89         <executions>
90           <execution>
91             <id>enforce-banned-dependencies</id>
92             <goals>
93               <goal>enforce</goal>
94             </goals>
95             <configuration>
96               <skip>true</skip>
97               <rules>
98                 <banTransitiveDependencies>
99 <!--
100                   <message>
101     Our client-facing artifacts are not supposed to have additional dependencies
102     and one or more of them do. The output from the enforcer plugin should give
103     specifics.
104                   </message>
106                   <excludes>
107                     <!-- We leave logging stuff alone -->
108                     <exclude>org.slf4j:*</exclude>
109                     <exclude>log4j:*</exclude>
110                     <exclude>commons-logging:*</exclude>
111                     <!-- annotations that never change -->
112                     <exclude>com.google.code.findbugs:*</exclude>
113                     <exclude>com.github.stephenc.findbugs:*</exclude>
114                     <exclude>com.github.spotbugs:*</exclude>
115                     <!-- We leave HTrace as an unshaded dependnecy on purpose so that tracing within a JVM will work -->
116                     <exclude>org.apache.htrace:*</exclude>
117                     <!-- NB we don't exclude Hadoop from this check here, because the assumption is any needed classes
118                          are contained in our artifacts.
119                       -->
120                   </excludes>
121                 </banTransitiveDependencies>
122                 <banDuplicateClasses>
123                   <findAllDuplicates>true</findAllDuplicates>
124                 </banDuplicateClasses>
125               </rules>
126             </configuration>
127           </execution>
128         </executions>
129       </plugin>
130       <plugin>
131         <groupId>org.apache.maven.plugins</groupId>
132         <artifactId>maven-resources-plugin</artifactId>
133         <executions>
134           <execution>
135             <id>test-resources</id>
136             <phase>pre-integration-test</phase>
137             <goals>
138               <goal>testResources</goal>
139             </goals>
140           </execution>
141         </executions>
142       </plugin>
143       <plugin>
144         <!-- create a maven pom property that has all of our dependencies.
145              below in the integration-test phase we'll pass this list
146              of paths to our jar checker script.
147           -->
148         <groupId>org.apache.maven.plugins</groupId>
149         <artifactId>maven-dependency-plugin</artifactId>
150         <executions>
151           <execution>
152             <id>put-client-artifacts-in-a-property</id>
153             <phase>pre-integration-test</phase>
154             <goals>
155               <goal>build-classpath</goal>
156             </goals>
157             <configuration>
158               <excludeScope>provided</excludeScope>
159               <excludeTransitive>true</excludeTransitive>
160               <outputProperty>hbase-client-artifacts</outputProperty>
161             </configuration>
162           </execution>
163         </executions>
164       </plugin>
165       <plugin>
166         <groupId>org.codehaus.mojo</groupId>
167         <artifactId>exec-maven-plugin</artifactId>
168         <version>1.6.0</version>
169         <executions>
170           <!-- It's easier to have two copies of our validation
171                script than to copy it via remote-resources-plugin, but
172                we need to make sure they stay the same.
173             -->
174           <execution>
175             <id>make-sure-validation-files-are-in-sync</id>
176             <phase>validate</phase>
177             <goals>
178               <goal>exec</goal>
179             </goals>
180             <configuration>
181               <executable>diff</executable>
182               <requiresOnline>false</requiresOnline>
183               <arguments>
184                 <argument>../hbase-shaded-with-hadoop-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh</argument>
185                 <argument>../hbase-shaded-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh</argument>
186               </arguments>
187             </configuration>
188           </execution>
189           <!--
190             Check that we actually relocated everything we included.
191             It's critical that we don't ship third party dependencies that haven't
192             been relocated under our package space, since this will lead to
193             difficult to debug classpath errors for downstream. Unfortunately, that
194             means inspecting all the jars.
195             -->
196           <execution>
197             <id>check-jar-contents-for-stuff-with-hadoop</id>
198             <phase>integration-test</phase>
199             <goals>
200               <goal>exec</goal>
201             </goals>
202             <configuration>
203               <executable>${shell-executable}</executable>
204               <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
205               <requiresOnline>false</requiresOnline>
206               <arguments>
207                 <argument>ensure-jars-have-correct-contents.sh</argument>
208                 <argument>--allow-hadoop</argument>
209                 <argument>${hbase-client-artifacts}</argument>
210               </arguments>
211             </configuration>
212           </execution>
213         </executions>
214       </plugin>
215     </plugins>
216   </build>
218 </project>