PHOENIX-3426 Fix the broken QueryServerBasicsIT

For integration tests with MiniHBaseCluster, we have to
deal with multiple versions of protobuf on the classpath.
As such, it's easier to use the shaded artifact from Avatica
instead of re-shading that in Phoenix and trying to keep
the Phoenix classes off the test classpath.
diff --git a/phoenix-queryserver/pom.xml b/phoenix-queryserver/pom.xml
index 5ee6121..f1637d9 100644
--- a/phoenix-queryserver/pom.xml
+++ b/phoenix-queryserver/pom.xml
@@ -36,7 +36,6 @@
   <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>
@@ -87,11 +86,6 @@
                   <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>
@@ -112,22 +106,6 @@
                   <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. -->
@@ -143,10 +121,19 @@
     <dependency>
       <groupId>org.apache.phoenix</groupId>
       <artifactId>phoenix-queryserver-client</artifactId>
+      <exclusions>
+        <!-- Being pulled in via avatica to avoid pb2/pb3 issues.
+             When we use the "pre-shaded" avatica artifact, we don't
+             have to deal with the mess of multiple versions for protobuf.-->
+        <exclusion>
+          <groupId>org.apache.calcite.avatica</groupId>
+          <artifactId>avatica-core</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.calcite.avatica</groupId>
-      <artifactId>avatica-core</artifactId>
+      <artifactId>avatica</artifactId>
     </dependency>
     <dependency>
       <groupId>org.apache.calcite.avatica</groupId>
diff --git a/pom.xml b/pom.xml
index a9c7b91..5f7021f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -749,6 +749,11 @@
       </dependency>
       <dependency>
         <groupId>org.apache.calcite.avatica</groupId>
+        <artifactId>avatica</artifactId>
+        <version>${avatica.version}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.calcite.avatica</groupId>
         <artifactId>avatica-core</artifactId>
         <version>${avatica.version}</version>
       </dependency>