HBASE-24031 TestHRegion.testCheckAndMutate_WithFilters is flaky (#1316)
[hbase.git] / hbase-shaded / hbase-shaded-check-invariants / pom.xml
blobbd9b3f4139ff1fd8004ab13867c06522e4e40cec
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-SNAPSHOT</version>
20     <relativePath>../..</relativePath>
21   </parent>
22   <artifactId>hbase-shaded-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</name>
33   <properties>
34   </properties>
36   <dependencies>
37     <!-- Include here any client facing artifacts that presume
38          the runtime environment will have hadoop.
40          If our checks fail for the shaded mapreduce artifact,
41          then probably a dependency from hadoop has shown up
42          in the hbase-mapreduce module without being flagged
43          as 'provided' scope. See the note by the relevant
44          hadoop profile in that module.
45       -->
46     <dependency>
47       <groupId>org.apache.hbase</groupId>
48       <artifactId>hbase-shaded-mapreduce</artifactId>
49       <version>${project.version}</version>
50     </dependency>
51     <dependency>
52       <groupId>org.apache.hbase</groupId>
53       <artifactId>hbase-shaded-client-byo-hadoop</artifactId>
54       <version>${project.version}</version>
55     </dependency>
56     <!-- parent pom defines these for children. :( :( :( -->
57     <dependency>
58       <groupId>com.github.stephenc.findbugs</groupId>
59       <artifactId>findbugs-annotations</artifactId>
60       <scope>provided</scope>
61     </dependency>
62     <dependency>
63       <groupId>log4j</groupId>
64       <artifactId>log4j</artifactId>
65       <scope>provided</scope>
66     </dependency>
67     <!-- Test dependencies -->
68     <dependency>
69       <groupId>junit</groupId>
70       <artifactId>junit</artifactId>
71       <scope>provided</scope>
72     </dependency>
73     <dependency>
74       <groupId>org.mockito</groupId>
75       <artifactId>mockito-core</artifactId>
76       <scope>provided</scope>
77     </dependency>
78   </dependencies>
79   <build>
80     <plugins>
81       <plugin>
82         <groupId>org.apache.maven.plugins</groupId>
83         <artifactId>maven-site-plugin</artifactId>
84         <configuration>
85           <skip>true</skip>
86         </configuration>
87       </plugin>
88       <plugin>
89         <groupId>org.apache.maven.plugins</groupId>
90         <artifactId>maven-enforcer-plugin</artifactId>
91         <executions>
92           <execution>
93             <id>enforce-banned-dependencies</id>
94             <goals>
95               <goal>enforce</goal>
96             </goals>
97             <configuration>
98               <skip>true</skip>
99               <rules>
100                 <banTransitiveDependencies>
101 <!--
102                   <message>
103     Our client-facing artifacts are not supposed to have additional dependencies
104     and one or more of them do. The output from the enforcer plugin should give
105     specifics.
106                   </message>
108                   <excludes>
109                     <!-- We leave logging stuff alone -->
110                     <exclude>org.slf4j:*</exclude>
111                     <exclude>log4j:*</exclude>
112                     <exclude>commons-logging:*</exclude>
113                     <!-- annotations that never change -->
114                     <exclude>com.google.code.findbugs:*</exclude>
115                     <exclude>com.github.stephenc.findbugs:*</exclude>
116                     <exclude>com.github.spotbugs:*</exclude>
117                     <!-- We leave HTrace as an unshaded dependnecy on purpose so that tracing within a JVM will work -->
118                     <exclude>org.apache.htrace:*</exclude>
119                     <!-- Our public API requires Hadoop at runtime to work -->
120                     <exclude>org.apache.hadoop:*</exclude>
121                   </excludes>
122                 </banTransitiveDependencies>
123                 <banDuplicateClasses>
124                   <findAllDuplicates>true</findAllDuplicates>
125                 </banDuplicateClasses>
126               </rules>
127             </configuration>
128           </execution>
129         </executions>
130       </plugin>
131       <plugin>
132         <groupId>org.apache.maven.plugins</groupId>
133         <artifactId>maven-resources-plugin</artifactId>
134         <executions>
135           <execution>
136             <id>test-resources</id>
137             <phase>pre-integration-test</phase>
138             <goals>
139               <goal>testResources</goal>
140             </goals>
141           </execution>
142         </executions>
143       </plugin>
144       <plugin>
145         <!-- create a maven pom property that has all of our dependencies.
146              below in the integration-test phase we'll pass this list
147              of paths to our jar checker script.
148           -->
149         <groupId>org.apache.maven.plugins</groupId>
150         <artifactId>maven-dependency-plugin</artifactId>
151         <executions>
152           <execution>
153             <id>put-client-artifacts-in-a-property</id>
154             <phase>pre-integration-test</phase>
155             <goals>
156               <goal>build-classpath</goal>
157             </goals>
158             <configuration>
159               <excludeScope>provided</excludeScope>
160               <excludeTransitive>true</excludeTransitive>
161               <outputProperty>hbase-client-artifacts</outputProperty>
162             </configuration>
163           </execution>
164         </executions>
165       </plugin>
166       <plugin>
167         <groupId>org.codehaus.mojo</groupId>
168         <artifactId>exec-maven-plugin</artifactId>
169         <version>1.6.0</version>
170         <executions>
171           <!-- It's easier to have two copies of our validation
172                script than to copy it via remote-resources-plugin, but
173                we need to make sure they stay the same.
174             -->
175           <execution>
176             <id>make-sure-validation-files-are-in-sync</id>
177             <phase>validate</phase>
178             <goals>
179               <goal>exec</goal>
180             </goals>
181             <configuration>
182               <executable>diff</executable>
183               <requiresOnline>false</requiresOnline>
184               <arguments>
185                 <argument>../hbase-shaded-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh</argument>
186                 <argument>../hbase-shaded-with-hadoop-check-invariants/src/test/resources/ensure-jars-have-correct-contents.sh</argument>
187               </arguments>
188             </configuration>
189           </execution>
190           <!--
191             Check that we actually relocated everything we included.
192             It's critical that we don't ship third party dependencies that haven't
193             been relocated under our package space, since this will lead to
194             difficult to debug classpath errors for downstream. Unfortunately, that
195             means inspecting all the jars.
196             -->
197           <execution>
198             <id>check-jar-contents</id>
199             <phase>integration-test</phase>
200             <goals>
201               <goal>exec</goal>
202             </goals>
203             <configuration>
204               <executable>${shell-executable}</executable>
205               <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
206               <requiresOnline>false</requiresOnline>
207               <!-- Important that we don't pass the 'allow-hadoop' flag here, because
208                    we allowed it as a provided dependency above.
209                 -->
210               <arguments>
211                 <argument>ensure-jars-have-correct-contents.sh</argument>
212                 <argument>${hbase-client-artifacts}</argument>
213               </arguments>
214             </configuration>
215           </execution>
216         </executions>
217       </plugin>
218     </plugins>
219   </build>
221 </project>