This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new f6fee0744 ORC-1333: Exclude the proto files from the nohive jar
f6fee0744 is described below
commit f6fee0744ed46c741d90dc116f490cefb10efa99
Author: Fokko Driesprong <[email protected]>
AuthorDate: Tue Dec 6 10:14:33 2022 -0800
ORC-1333: Exclude the proto files from the nohive jar
### Why are the changes needed?
We're seeing some conflicts in the proto files when updating Iceberg in
Trino: https://github.com/trinodb/trino/pull/15079#discussion_r1025121839
I think we should exclude the proto files from the `nohive` jar.
Before the change:
```
➜ java git:(main) ✗ rm -rf core/target/
➜ java git:(main) ✗ mvn package -DskipTests
➜ java git:(main) ✗ cd core/target
➜ target git:(main) ✗ unzip orc-core-1.9.0-SNAPSHOT-nohive.jar
➜ target git:(main) find . | grep -i "google/protobuf/"
./google/protobuf/timestamp.proto
./google/protobuf/field_mask.proto
./google/protobuf/api.proto
./google/protobuf/duration.proto
./google/protobuf/struct.proto
./google/protobuf/wrappers.proto
./google/protobuf/source_context.proto
./google/protobuf/any.proto
./google/protobuf/type.proto
./google/protobuf/empty.proto
./google/protobuf/compiler
./google/protobuf/compiler/plugin.proto
./google/protobuf/descriptor.proto
```
After the change:
```
➜ java git:(main) ✗ rm -rf core/target/
➜ java git:(main) ✗ mvn package -DskipTests
➜ java git:(main) ✗ cd core/target
➜ target git:(main) ✗ unzip orc-core-1.9.0-SNAPSHOT-nohive.jar
➜ target git:(main) ✗ find . | grep -i "google/protobuf/"
∅
```
Interestingly enough, the normal jar doesn't contain these proto files:
```
➜ java git:(main) ✗ rm -rf core/target/
➜ java git:(main) ✗ mvn package -DskipTests
➜ java git:(main) ✗ cd core/target
➜ target git:(main) unzip orc-core-1.9.0-SNAPSHOT.jar| grep -i proto
➜ target git:(main) find . | grep -i "google/protobuf/"
∅
```
### What changes were proposed in this pull request?
Exclude the proto files
### How was this patch tested?
Inspecting the produced jar
Closes https://github.com/apache/orc/issues/1333
Closes #1334 from Fokko/fd-exclude-proto-files.
Authored-by: Fokko Driesprong <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
java/pom.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/java/pom.xml b/java/pom.xml
index c2083690f..5060f15e2 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -506,6 +506,7 @@
<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/NOTICE</exclude>
+ <exclude>google/protobuf/**</exclude>
</excludes>
</filter>
</filters>