Skip to content

Commit 0710f6b

Browse files
committed
HBASE-26592 Fix the broken shaded protobuf module (#70)
Signed-off-by: Pankaj Kumar <[email protected]>
1 parent 247c926 commit 0710f6b

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

hbase-shaded-protobuf/pom.xml

+15-13
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@
3232
Pulls down protobuf, patches it, compiles, and then relocates/shades.
3333
</description>
3434
<build>
35+
<resources>
36+
<resource>
37+
<directory>src/main/java</directory>
38+
<includes>
39+
<!-- include the protos -->
40+
<include>google/**</include>
41+
</includes>
42+
</resource>
43+
</resources>
3544
<plugins>
3645
<plugin>
3746
<!--Clean needs to purge src/main/java since this is where
@@ -78,6 +87,12 @@
7887
<goal>unpack</goal>
7988
</goals>
8089
<configuration>
90+
<!--
91+
The protobuf-java has no compile or runtime dependency so we
92+
only depend it here, without adding it to our dependencies
93+
section. Need to review later if protobuf-java has compile or
94+
runtime dependencies in the future.
95+
-->
8196
<artifactItems>
8297
<artifactItem>
8398
<groupId>com.google.protobuf</groupId>
@@ -148,12 +163,6 @@
148163
<configuration>
149164
<shadeSourcesContent>true</shadeSourcesContent>
150165
<createSourcesJar>true</createSourcesJar>
151-
<artifactSet>
152-
<excludes>
153-
<!-- We will compile our own version, so exclude the original one -->
154-
<exclude>com.google.protobuf:protobuf-java</exclude>
155-
</excludes>
156-
</artifactSet>
157166
<relocations>
158167
<relocation>
159168
<pattern>com.google.protobuf</pattern>
@@ -177,11 +186,4 @@
177186
</plugin>
178187
</plugins>
179188
</build>
180-
<dependencies>
181-
<dependency>
182-
<groupId>com.google.protobuf</groupId>
183-
<artifactId>protobuf-java</artifactId>
184-
<version>${protobuf.version}</version>
185-
</dependency>
186-
</dependencies>
187189
</project>

0 commit comments

Comments
 (0)