HBASE-26592 Fix the broken shaded protobuf module (#70)

Signed-off-by: Pankaj Kumar <pankajkumar@apache.org>
diff --git a/hbase-shaded-protobuf/pom.xml b/hbase-shaded-protobuf/pom.xml
index c7afbda..1220518 100644
--- a/hbase-shaded-protobuf/pom.xml
+++ b/hbase-shaded-protobuf/pom.xml
@@ -32,6 +32,15 @@
     Pulls down protobuf, patches it, compiles, and then relocates/shades.
   </description>
   <build>
+    <resources>
+      <resource>
+        <directory>src/main/java</directory>
+        <includes>
+          <!-- include the protos -->
+          <include>google/**</include>
+        </includes>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <!--Clean needs to purge src/main/java since this is where
@@ -77,6 +86,12 @@
               <goal>unpack</goal>
             </goals>
             <configuration>
+              <!--
+                The protobuf-java has no compile or runtime dependency so we
+                only depend it here, without adding it to our dependencies
+                section. Need to review later if protobuf-java has compile or
+                runtime dependencies in the future.
+              -->
               <artifactItems>
                 <artifactItem>
                   <groupId>com.google.protobuf</groupId>
@@ -146,12 +161,6 @@
             <configuration>
               <shadeSourcesContent>true</shadeSourcesContent>
               <createSourcesJar>true</createSourcesJar>
-              <artifactSet>
-                <excludes>
-                  <!-- We will compile our own version, so exclude the original one -->
-                  <exclude>com.google.protobuf:protobuf-java</exclude>
-                </excludes>
-              </artifactSet>
               <relocations>
                 <relocation>
                   <pattern>com.google.protobuf</pattern>
@@ -175,11 +184,4 @@
       </plugin>
     </plugins>
   </build>
-  <dependencies>
-    <dependency>
-      <groupId>com.google.protobuf</groupId>
-      <artifactId>protobuf-java</artifactId>
-      <version>${protobuf.version}</version>
-    </dependency>
-  </dependencies>
 </project>