2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
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
13 * http://www.apache.org/licenses/LICENSE-2.0
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.
22 <modelVersion>4.0.0</modelVersion>
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>
29 <artifactId>hbase-protocol-shaded</artifactId>
30 <name>Apache HBase - Shaded Protocol</name>
31 <description>Shaded protobuf protocol classes used by HBase internally.</description>
33 <maven.javadoc.skip>true</maven.javadoc.skip>
34 <!--Version of protobuf that hbase uses internally (we shade our pb)
35 Must match what is out in hbase-thirdparty include.
36 3.5.1-1 is the same as 3.5.1 except includes corrected binaries for el6
37 to work around https://github.com/google/protobuf/issues/4109
39 <internal.protobuf.version>3.5.1-1</internal.protobuf.version>
44 <directory>src/main/</directory>
46 <include>**/*.proto</include>
51 <!-- Make a jar and put the sources in the jar -->
53 <groupId>org.apache.maven.plugins</groupId>
54 <artifactId>maven-source-plugin</artifactId>
57 <!--Make it so assembly:single does nothing in here-->
58 <artifactId>maven-assembly-plugin</artifactId>
60 <skipAssembly>true</skipAssembly>
64 <artifactId>maven-surefire-plugin</artifactId>
65 <!-- Always skip the second part executions, since we only run simple unit tests in this module -->
68 <id>secondPartTestsExecution</id>
80 <groupId>org.xolstice.maven.plugins</groupId>
81 <artifactId>protobuf-maven-plugin</artifactId>
84 <id>compile-protoc</id>
85 <phase>generate-sources</phase>
90 <protocArtifact>com.google.protobuf:protoc:${internal.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
91 <attachProtoSources>false</attachProtoSources>
92 <checkStaleness>true</checkStaleness>
97 <!--Need this old plugin to replace in generated files instances
98 of com.google.protobuf so instead its o.a.h.h.com.google.protobuf.
99 Plugin is old and in google code archive. Here is usage done by
100 anohther: https://github.com/beiliubei/maven-replacer-plugin/wiki/Usage-Guide
101 The mess with the regex in the below is to prevent replacement every time
102 we run mvn install. There is probably a better way of avoiding the
103 double interpolation but this is it for now.
106 <groupId>com.google.code.maven-replacer-plugin</groupId>
107 <artifactId>replacer</artifactId>
108 <version>1.5.3</version>
111 <phase>process-sources</phase>
118 <basedir>${basedir}/target/generated-sources/</basedir>
120 <include>**/*.java</include>
122 <!-- Ignore errors when missing files, because it means this build
123 was run with -Dprotoc.skip and there is no -Dreplacer.skip -->
124 <ignoreErrors>true</ignoreErrors>
127 <token>([^\.])com.google.protobuf</token>
128 <value>$1org.apache.hbase.thirdparty.com.google.protobuf</value>
131 <token>(public)(\W+static)?(\W+final)?(\W+class)</token>
132 <value>@javax.annotation.Generated("proto") $1$2$3$4</value>
134 <!-- replacer doesn't support anchoring or negative lookbehind -->
136 <token>(@javax.annotation.Generated\("proto"\) ){2}</token>
143 <groupId>org.apache.maven.plugins</groupId>
144 <artifactId>maven-shade-plugin</artifactId>
147 <phase>package</phase>
152 <minimizeJar>true</minimizeJar>
153 <shadeSourcesContent>true</shadeSourcesContent>
154 <!-- Causes an NPE until shade 3.0.1. See MSHADE-247
155 <createSourcesJar>true</createSourcesJar>
159 <pattern>com.google.protobuf</pattern>
160 <shadedPattern>org.apache.hadoop.hbase.shaded.com.google.protobuf</shadedPattern>
165 <!--Exclude protobuf itself. We get a patched version from hbase-thirdparty.
167 <exclude>org.apache.hbase.thirdparty:*</exclude>
168 <exclude>com.google.protobuf:protobuf-java</exclude>
169 <exclude>com.google.code.findbugs:*</exclude>
170 <exclude>com.google.errorprone:error_prone_annotations</exclude>
171 <exclude>com.google.j2objc:j2objc-annotations</exclude>
172 <exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
173 <exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
174 <exclude>junit:junit</exclude>
175 <exclude>log4j:log4j</exclude>
176 <exclude>commons-logging:commons-logging</exclude>
177 <exclude>org.slf4j:slf4j-api</exclude>
178 <exclude>org.apache.yetus:audience-annotations</exclude>
179 <exclude>com.github.stephenc.fingbugs:*</exclude>
188 <groupId>org.apache.maven.plugins</groupId>
189 <artifactId>maven-checkstyle-plugin</artifactId>
191 <failOnViolation>true</failOnViolation>
195 <groupId>net.revelc.code</groupId>
196 <artifactId>warbucks-maven-plugin</artifactId>
201 <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
203 <groupId>org.eclipse.m2e</groupId>
204 <artifactId>lifecycle-mapping</artifactId>
206 <lifecycleMappingMetadata>
209 <pluginExecutionFilter>
210 <groupId>org.apache.hadoop</groupId>
211 <artifactId>hadoop-maven-plugins</artifactId>
212 <versionRange>[2.0.5-alpha,)</versionRange>
216 </pluginExecutionFilter>
222 <pluginExecutionFilter>
224 com.google.code.maven-replacer-plugin
226 <artifactId>replacer</artifactId>
227 <versionRange>[1.5.3,)</versionRange>
231 </pluginExecutionFilter>
234 <runOnIncremental>false</runOnIncremental>
239 </lifecycleMappingMetadata>
246 <!--BE CAREFUL! Any dependency added here needs to be
247 excluded above in the shade plugin else the dependency
249 <!-- Intra-project dependencies -->
251 <groupId>org.apache.hbase.thirdparty</groupId>
252 <artifactId>hbase-shaded-protobuf</artifactId>
255 <groupId>junit</groupId>
256 <artifactId>junit</artifactId>
260 <groupId>org.apache.htrace</groupId>
261 <artifactId>htrace-core4</artifactId>
265 <!-- Skip the tests in this module -->
267 <id>skip-protocol-shaded-tests</id>
270 <name>skip-protocol-shaded-tests</name>
274 <surefire.skipFirstPart>true</surefire.skipFirstPart>
275 <surefire.skipSecondPart>true</surefire.skipSecondPart>