PHOENIX-3426 Upgrade to Avatica 1.9.0

Avatica reworked its shaded artifacts, so we should account
for that downstream. Makes sure that our artifacts are not
leaking classes that we bundle (emphasis on the thin-client jar)

Tweaked some other ancillary properties/deps to make the build
a bit more natural when we have divergent dependency versions.


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/89498338
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/89498338
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/89498338

Branch: refs/heads/4.x-HBase-1.1
Commit: 89498338940f33b2ca7de73bc82abee1833091f2
Parents: 14f2026
Author: Josh Elser <[email protected]>
Authored: Mon Oct 31 10:43:20 2016 -0400
Committer: Josh Elser <[email protected]>
Committed: Mon Oct 31 11:06:51 2016 -0400

----------------------------------------------------------------------
 phoenix-core/pom.xml               |  1 +
 phoenix-queryserver-client/pom.xml | 12 +++++++++++-
 phoenix-queryserver/pom.xml        | 25 ++++++++++++++++++++++++-
 pom.xml                            |  9 ++-------
 4 files changed, 38 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/89498338/phoenix-core/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-core/pom.xml b/phoenix-core/pom.xml
index 2e5c53e..2b521dc 100644
--- a/phoenix-core/pom.xml
+++ b/phoenix-core/pom.xml
@@ -311,6 +311,7 @@
       <artifactId>protobuf-java</artifactId>
       <version>${protobuf-java.version}</version>
     </dependency>
+    <!-- Intentionally avoid an dependencyManagement entry because of conflict 
with thin-client -->
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/89498338/phoenix-queryserver-client/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-queryserver-client/pom.xml 
b/phoenix-queryserver-client/pom.xml
index e38149e..d1cb0f5 100644
--- a/phoenix-queryserver-client/pom.xml
+++ b/phoenix-queryserver-client/pom.xml
@@ -50,6 +50,7 @@
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
     <shaded.package>org.apache.phoenix.shaded</shaded.package>
+    <protobuf-java.version>3.1.0</protobuf-java.version>
   </properties>
 
   <build>
@@ -89,6 +90,7 @@
                   <resource>NOTICE</resource>
                   <file>${project.basedir}/../NOTICE</file>
                 </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
               </transformers>
               <filters>
                 <filter>
@@ -112,6 +114,14 @@
                   <pattern>com.fasterxml</pattern>
                   
<shadedPattern>${shaded.package}.com.fasterxml</shadedPattern>
                 </relocation>
+                <relocation>
+                  <pattern>com.google.collect</pattern>
+                  
<shadedPattern>${shaded.package}.com.google.collect</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.google.protobuf</pattern>
+                  
<shadedPattern>${shaded.package}.com.google.protobuf</shadedPattern>
+                </relocation>
                 <!-- ORG relocation -->
                 <!-- Calcite/Avatica is not relocated because the wire API (as 
of <=1.8.0) expects
                      consistent class names on client and server. Relocating 
these would break
@@ -172,7 +182,7 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.calcite.avatica</groupId>
-      <artifactId>avatica</artifactId>
+      <artifactId>avatica-core</artifactId>
     </dependency>
     <dependency>
       <!-- a dependency for the thin-client uberjar -->

http://git-wip-us.apache.org/repos/asf/phoenix/blob/89498338/phoenix-queryserver/pom.xml
----------------------------------------------------------------------
diff --git a/phoenix-queryserver/pom.xml b/phoenix-queryserver/pom.xml
index f75512e..4f4859e 100644
--- a/phoenix-queryserver/pom.xml
+++ b/phoenix-queryserver/pom.xml
@@ -36,6 +36,7 @@
   <properties>
     <top.dir>${project.basedir}/..</top.dir>
     <shaded.package>org.apache.phoenix.shaded</shaded.package>
+    <protobuf-java.version>3.1.0</protobuf-java.version>
   </properties>
 
   <build>
@@ -79,12 +80,18 @@
                   <resource>NOTICE</resource>
                   <file>${project.basedir}/../NOTICE</file>
                 </transformer>
+                <transformer 
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
               </transformers>
               <artifactSet>
                 <includes>
                   <include>org.apache.calcite.avatica:*</include>
                   <include>org.eclipse.jetty:*</include>
                   <include>javax.servlet:*</include>
+                  <include>org.apache.httpcomponents:*</include>
+                  <include>commons-codec:*</include>
+                  <include>commons-logging:*</include>
+                  <include>com.google.protobuf:*</include>
+                  <include>com.fasterxml.jackson.core:*</include>
                 </includes>
               </artifactSet>
               <filters>
@@ -105,6 +112,22 @@
                   <pattern>org.eclipse.jetty</pattern>
                   
<shadedPattern>${shaded.package}.org.eclipse.jetty</shadedPattern>
                 </relocation>
+                <relocation>
+                  <pattern>com.google.protobuf</pattern>
+                  
<shadedPattern>${shaded.package}.com.google.protobuf</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>com.fasterxml.jackson</pattern>
+                  
<shadedPattern>${shaded.package}.com.fasterxml.jackson</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.apache.commons</pattern>
+                  
<shadedPattern>${shaded.package}.org.apache.commons</shadedPattern>
+                </relocation>
+                <relocation>
+                  <pattern>org.apache.http</pattern>
+                  
<shadedPattern>${shaded.package}.org.apache.http</shadedPattern>
+                </relocation>
                 <!-- Calcite/Avatica is not relocated because the wire API (as 
of <=1.8.0) expects
                      consistent class names on client and server. Relocating 
these would break
                      backwards compatibility. -->
@@ -123,7 +146,7 @@
     </dependency>
     <dependency>
       <groupId>org.apache.calcite.avatica</groupId>
-      <artifactId>avatica</artifactId>
+      <artifactId>avatica-core</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.calcite.avatica</groupId>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/89498338/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 231a0e8..459cb7e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -96,7 +96,7 @@
     <!-- Do not change jodatime.version until HBASE-15199 is fixed -->
     <jodatime.version>1.6</jodatime.version>
     <joni.version>2.1.2</joni.version>
-    <avatica.version>1.8.0</avatica.version>
+    <avatica.version>1.9.0</avatica.version>
     <jettyVersion>8.1.7.v20120910</jettyVersion>
     <tephra.version>0.9.0-incubating</tephra.version>
     <spark.version>1.6.1</spark.version>
@@ -749,7 +749,7 @@
       </dependency>
       <dependency>
         <groupId>org.apache.calcite.avatica</groupId>
-        <artifactId>avatica</artifactId>
+        <artifactId>avatica-core</artifactId>
         <version>${avatica.version}</version>
       </dependency>
       <dependency>
@@ -895,11 +895,6 @@
         <version>${protobuf-java.version}</version>
       </dependency>
       <dependency>
-        <groupId>org.apache.httpcomponents</groupId>
-        <artifactId>httpclient</artifactId>
-        <version>4.0.1</version>
-      </dependency>
-      <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>${log4j.version}</version>

Reply via email to