From 239110e16e73b30a352f9dfe7d0be2afed2da9a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 24 Jul 2026 09:38:56 +0200 Subject: [PATCH] build(grpc): upgrade protobuf-maven-plugin to 5.1.7 Migrate all protobuf compilation to io.github.ascopes:protobuf-maven-plugin 5.1.7, replacing both the hardcoded 4.1.2 in spec-grpc and the legacy org.xolstice.maven.plugins plugin in compat-0.3/spec-grpc: - Centralize version in parent POM property - Update plugin configuration to v5.x API (protoc, plugins, goals) - Add GitHub Actions workflow to verify gRPC code generation in CI Signed-off-by: Emmanuel Hugonnet --- .github/workflows/verify-grpc-generation.yml | 29 ++++++++++++++++++++ compat-0.3/spec-grpc/pom.xml | 25 +++++++++++------ pom.xml | 2 +- spec-grpc/pom.xml | 14 ++++++---- 4 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/verify-grpc-generation.yml diff --git a/.github/workflows/verify-grpc-generation.yml b/.github/workflows/verify-grpc-generation.yml new file mode 100644 index 000000000..3bf624377 --- /dev/null +++ b/.github/workflows/verify-grpc-generation.yml @@ -0,0 +1,29 @@ +name: Verify gRPC Generation + +on: + push: + pull_request: + workflow_dispatch: + +# Only run the latest job +concurrency: + group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}' + cancel-in-progress: true + +jobs: + verify-grpc-generation: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Set up JDK 21 + uses: actions/setup-java@v5 + with: + java-version: '21' + distribution: 'temurin' + cache: maven + - name: Verify gRPC code generation + # -pl: build only spec-grpc and compat-0.3/spec-grpc modules + # -am: also build their dependencies + # -Dskip.protobuf.generate=false: enable protoc generation in spec-grpc (skipped by default) + # -Pproto-compile: activate the proto-compile profile in compat-0.3/spec-grpc + run: mvn install -B -DskipTests -pl spec-grpc,compat-0.3/spec-grpc -am -Dskip.protobuf.generate=false -Pproto-compile diff --git a/compat-0.3/spec-grpc/pom.xml b/compat-0.3/spec-grpc/pom.xml index de0a01dc8..c6d5a36a0 100644 --- a/compat-0.3/spec-grpc/pom.xml +++ b/compat-0.3/spec-grpc/pom.xml @@ -95,7 +95,6 @@ proto-compile - org.apache.maven.plugins @@ -125,21 +124,29 @@ - org.xolstice.maven.plugins + io.github.ascopes protobuf-maven-plugin ${protobuf-maven-plugin.version} - com.google.protobuf:protoc:${protobuf-java.version}:exe:${os.detected.classifier} - grpc-java - io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier} - src/main/java - false + ${skip.protobuf.generate} + true + + ${protobuf-java.version} + + ${project.basedir}/src/main/java/ + + + io.grpc + protoc-gen-grpc-java + ${grpc.version} + + + generate-sources - compile - compile-custom + generate diff --git a/pom.xml b/pom.xml index d0e6dbd38..95561461a 100644 --- a/pom.xml +++ b/pom.xml @@ -64,7 +64,7 @@ 1.1.1 1.7.1 4.33.2 - 0.6.1 + 5.1.7 3.36.3 6.0.0 2.0.18 diff --git a/spec-grpc/pom.xml b/spec-grpc/pom.xml index d4d11180f..5aae238a4 100644 --- a/spec-grpc/pom.xml +++ b/spec-grpc/pom.xml @@ -96,19 +96,21 @@ io.github.ascopes protobuf-maven-plugin - 4.1.2 + ${protobuf-maven-plugin.version} ${skip.protobuf.generate} true - ${protobuf-java.version} + + ${protobuf-java.version} + ${project.basedir}/src/main/java/ - - + + io.grpc protoc-gen-grpc-java ${grpc.version} - - + +