This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 71b685870f4e CAMEL-27188: camel-google-vertexai - pin protobuf-java to
4.x to prevent version conflict (#30375)
71b685870f4e is described below
commit 71b685870f4efeb6e2720a4f17ba38e7d7ffa4f3
Author: Guillaume Nodet <[email protected]>
AuthorDate: Thu Nov 19 16:44:35 2026 +0100
CAMEL-27188: camel-google-vertexai - pin protobuf-java to 4.x to prevent
version conflict (#30375)
google-genai 2.0.0 declares protobuf-java:3.25.5 as a direct compile
dependency. Without the parent BOM's dependencyManagement (e.g. in Camel
JBang or standalone apps), Maven's nearest-wins rule selects 3.25.5 over
the protobuf 4.x required by proto-google-cloud-aiplatform-v1, causing
the endpoint to fail at startup with a class compatibility error.
Fix: exclude protobuf-java from google-genai and add an explicit
protobuf-java:version (4.35.1) dependency, mirroring the
existing pattern used for google-auth-library-* in the same pom.
Co-authored-by: Claude Sonnet 4.6 <[email protected]>
---
components/camel-google/camel-google-vertexai/pom.xml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/components/camel-google/camel-google-vertexai/pom.xml
b/components/camel-google/camel-google-vertexai/pom.xml
index 2f5a8982e0c3..a43b4eb038ac 100644
--- a/components/camel-google/camel-google-vertexai/pom.xml
+++ b/components/camel-google/camel-google-vertexai/pom.xml
@@ -62,6 +62,11 @@
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</exclusion>
+ <!-- Exclude protobuf-java to use the aligned version needed
by google-cloud-aiplatform (4.x) -->
+ <exclusion>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ </exclusion>
<!-- Exclude auth libraries to use aligned versions from
aiplatform -->
<exclusion>
<groupId>com.google.auth</groupId>
@@ -96,6 +101,15 @@
<artifactId>google-auth-library-credentials</artifactId>
<version>${google-auth-library-oauth2-http-version}</version>
</dependency>
+ <!-- Explicit protobuf-java dependency: google-genai 2.0.0 declares
protobuf-java:3.25.5 as a direct compile
+ dependency, which wins over google-cloud-aiplatform's protobuf
4.x via Maven nearest-wins when the parent
+ dependencyManagement is not in scope (e.g. Camel JBang,
standalone apps). Pin to the 4.x version needed
+ by proto-google-cloud-aiplatform-v1. -->
+ <dependency>
+ <groupId>com.google.protobuf</groupId>
+ <artifactId>protobuf-java</artifactId>
+ <version>${protobuf-version}</version>
+ </dependency>
<!-- for testing -->
<dependency>