Skip to content

Commit 414dc6b

Browse files
onobcdsyer
authored andcommitted
Exclude older protofuf lib from grpc lib
This commit excludes the older protobuf libs `protobuf-java` and `proto-google-common-protos` from the `grpc-protobuf` lib and then explicitly adds back in the dependencies at the desired version in the root pom.xml
1 parent f31d6ad commit 414dc6b

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

pom.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@
7676
<!-- production dependencies -->
7777
<spring-framework.version>6.1.14</spring-framework.version>
7878
<netty.version>4.1.113.Final</netty.version>
79-
<protobuf-java.version>3.25.5</protobuf-java.version>
8079
<grpc.version>1.63.2</grpc.version>
80+
<protobuf-java.version>3.25.5</protobuf-java.version>
81+
<google-common-protos.version>2.46.0</google-common-protos.version>
8182

8283
<!-- internal dependencies -->
8384
<spring-boot.version>3.3.4</spring-boot.version>
@@ -404,6 +405,11 @@
404405
<type>pom</type>
405406
<scope>import</scope>
406407
</dependency>
408+
<dependency>
409+
<groupId>com.google.api.grpc</groupId>
410+
<artifactId>proto-google-common-protos</artifactId>
411+
<version>${google-common-protos.version}</version>
412+
</dependency>
407413
</dependencies>
408414
</dependencyManagement>
409415

spring-grpc-core/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,26 @@
4242
<dependency>
4343
<groupId>io.grpc</groupId>
4444
<artifactId>grpc-protobuf</artifactId>
45+
<exclusions>
46+
<exclusion>
47+
<groupId>com.google.protobuf</groupId>
48+
<artifactId>protobuf-java</artifactId>
49+
</exclusion>
50+
<exclusion>
51+
<groupId>com.google.api.grpc</groupId>
52+
<artifactId>proto-google-common-protos</artifactId>
53+
</exclusion>
54+
</exclusions>
4555
</dependency>
56+
<dependency>
57+
<groupId>com.google.protobuf</groupId>
58+
<artifactId>protobuf-java</artifactId>
59+
</dependency>
60+
<dependency>
61+
<groupId>com.google.api.grpc</groupId>
62+
<artifactId>proto-google-common-protos</artifactId>
63+
</dependency>
64+
4665
<dependency>
4766
<groupId>io.grpc</groupId>
4867
<artifactId>grpc-stub</artifactId>

spring-grpc-spring-boot-autoconfigure/pom.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@
5454
<artifactId>grpc-netty-shaded</artifactId>
5555
<optional>true</optional>
5656
</dependency>
57-
<dependency>
58-
<groupId>com.google.protobuf</groupId>
59-
<artifactId>protobuf-java</artifactId>
60-
<optional>true</optional>
61-
</dependency>
6257

6358
<!-- test dependencies -->
6459
<dependency>

0 commit comments

Comments
 (0)