Skip to content
Permalink
Browse files
Add a netty module; it has enough idiosynchracies to justify special …
…treatment
  • Loading branch information
saintstack committed Jun 29, 2017
1 parent 1ad82e3 commit e7f8d0d05a926b4d0117e772f309d4031b84d0c3
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 29 deletions.
@@ -19,9 +19,9 @@ To build a src tarball:
(Make sure you have your credentials set over in ~/.m2/settings.xml, etc. -- see
hbase refguide for publishing SNAPSHOTS/Release Candidates)

We have two submodules, one to patch and then relocate (shade) protobuf. The other
modules relocate a bundle of other (unpatched) libs used by hbase. This latter
set includes protobuf-util, netty-all, gson, and guava.
We have a number of submodules, one per ornery lib -- protobuf and netty --
where we need special-handling and then a bucket for all the rest,
hbase-shaded-miscellaneous. This latter includes protobuf-util, gson, and guava.

All shading is done using the same relocation offset of
org.apache.hadoop.hbase.shaded; we add this prefix to the relocated thirdparty
@@ -0,0 +1,113 @@
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<!--
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
ON MVN COMPILE NOT WORKING
If you wondering why 'mvn compile' does not work building HBase
(in particular, if you are doing it for the first time), instead do
'mvn package'. If you are interested in the full story, see
https://issues.apache.org/jira/browse/HBASE-6795.
-->
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hbase.thirdparty</groupId>
<artifactId>hbase-thirdparty</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>hbase-shaded-miscellaneous</artifactId>
<name>Apache HBase Relocated (Shaded) Third-party Miscellaneous Libs</name>
<description>
Pulls down a set of libs, relocates them and then makes a fat new jar with them all in it.
See below for what this miscellaney includes.
</description>
<build>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>dependency-reduced-pom.xml</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<relocations>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${rename.offset}.com.google</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
<!--Exclude protobuf itself. We get a patched version in adjacent module.
Exclude other dependencies of guava, netty, etc.
-->
<exclude>com.google.protobuf:protobuf-java</exclude>
<exclude>com.google.code.findbugs:jsr305</exclude>
<exclude>com.google.errorprone:error_prone_annotations</exclude>
<exclude>com.google.j2objc:j2objc-annotations</exclude>
<exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
<exclude>org.codehaus.mojo:animal-sniffer-annotations</exclude>
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<!--Version should be same as protobuf except sometimes
they publish new protobuf version w/o updating util.-->
<version>3.3.0</version>
</dependency>
</dependencies>
</project>
@@ -35,10 +35,10 @@
<version>1.0.0-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<artifactId>hbase-shaded-thirdparty</artifactId>
<name>Apache HBase Relocated (Shaded) Third-party Libs</name>
<artifactId>hbase-shaded-netty</artifactId>
<name>Apache HBase Relocated (Shaded) Netty Libs</name>
<description>
Pulls down libs, relocates them and then makes a fat new jar with them all in it.
Pulls down netty.io, relocates nd then makes a fat new jar with them all in it.
</description>
<build>
<plugins>
@@ -70,10 +70,6 @@
<pattern>io.netty</pattern>
<shadedPattern>${rename.offset}.io.netty</shadedPattern>
</relocation>
<relocation>
<pattern>com.google</pattern>
<shadedPattern>${rename.offset}.com.google</shadedPattern>
</relocation>
</relocations>
<artifactSet>
<excludes>
@@ -140,23 +136,6 @@
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<!--Version should be same as protobuf except sometimes
they publish new protobuf version w/o updating util.-->
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
@@ -55,7 +55,8 @@
</licenses>
<modules>
<module>hbase-shaded-protobuf</module>
<module>hbase-shaded-thirdparty</module>
<module>hbase-shaded-netty</module>
<module>hbase-shaded-miscellaneous</module>
</modules>
<scm>
<connection>scm:git:git://git.apache.org/hbase-thirdparty.git</connection>
@@ -30,7 +30,8 @@
<useAllReactorProjects>true</useAllReactorProjects>
<includes>
<include>org.apache.hbase.thirdparty:hbase-shaded-protobuf</include>
<include>org.apache.hbase.thirdparty:hbase-shaded-thirdparty</include>
<include>org.apache.hbase.thirdparty:hbase-shaded-netty</include>
<include>org.apache.hbase.thirdparty:hbase-shaded-miscellaneous</include>
</includes>
<!-- Include all the sources in the top directory -->
<sources>

0 comments on commit e7f8d0d

Please sign in to comment.