This is an automated email from the ASF dual-hosted git repository.

smengcl pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 5c759d0499c HDDS-15681. Switch to 
io.github.ascopes:protobuf-maven-plugin (#11429)
5c759d0499c is described below

commit 5c759d0499c630b567b1863226924e561e22f7c2
Author: Doroszlai, Attila <[email protected]>
AuthorDate: Wed Oct 7 22:47:44 2026 +0200

    HDDS-15681. Switch to io.github.ascopes:protobuf-maven-plugin (#11429)
---
 CONTRIBUTING.md                        |  4 ++--
 hadoop-hdds/interface-admin/pom.xml    | 10 +++++-----
 hadoop-hdds/interface-client/pom.xml   | 30 +++++++++++++++++-------------
 hadoop-hdds/interface-server/pom.xml   | 30 +++++++++++++++++-------------
 hadoop-hdds/server-scm/pom.xml         |  8 +++++---
 hadoop-ozone/interface-client/pom.xml  | 21 ++++++++++++---------
 hadoop-ozone/interface-storage/pom.xml |  9 +++++----
 pom.xml                                | 10 ++++++----
 8 files changed, 69 insertions(+), 53 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8434542915d..16a2487bb8e 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -40,8 +40,8 @@ If you have any questions, please don't hesitate to contact
 Requirements to compile the code:
 
 * Unix System
-* JDK 17 or later; client modules can be built with JDK 8
-* Maven 3.6.3 or later
+* JDK 17 or later
+* Maven 3.9.6 or later
 * Internet connection for first build (to fetch all Maven and Ozone 
dependencies)
 
 (Standard development tools such as make, gcc, etc. are required.)
diff --git a/hadoop-hdds/interface-admin/pom.xml 
b/hadoop-hdds/interface-admin/pom.xml
index 0f2adece807..999079189e0 100644
--- a/hadoop-hdds/interface-admin/pom.xml
+++ b/hadoop-hdds/interface-admin/pom.xml
@@ -58,18 +58,18 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
+        <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <executions>
           <execution>
             <id>compile-proto-${protobuf.version}</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
-              <clearOutputDirectory>false</clearOutputDirectory>
+              <protoc kind="binary-maven">
+                <version>${protobuf.version}</version>
+              </protoc>
             </configuration>
           </execution>
         </executions>
diff --git a/hadoop-hdds/interface-client/pom.xml 
b/hadoop-hdds/interface-client/pom.xml
index 62e77a6fff4..1c2a61a2eb3 100644
--- a/hadoop-hdds/interface-client/pom.xml
+++ b/hadoop-hdds/interface-client/pom.xml
@@ -63,41 +63,45 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
+        <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <executions>
           <execution>
             <id>compile-proto-for-ratis</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
-              <goal>compile-custom</goal>
-              <goal>test-compile-custom</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${ratis-thirdparty.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <protoc kind="binary-maven">
+                <version>${ratis-thirdparty.protobuf.version}</version>
+              </protoc>
               <includes>
                 <include>DatanodeClientProtocol.proto</include>
               </includes>
+              <incrementalCompilation>false</incrementalCompilation>
               
<outputDirectory>target/generated-sources/proto-java-for-ratis</outputDirectory>
-              <clearOutputDirectory>false</clearOutputDirectory>
-              <pluginId>grpc-java</pluginId>
-              
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${ratis-thirdparty.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+              <plugins>
+                <plugin kind="binary-maven">
+                  <groupId>io.grpc</groupId>
+                  <artifactId>protoc-gen-grpc-java</artifactId>
+                  <version>${ratis-thirdparty.grpc.version}</version>
+                </plugin>
+              </plugins>
             </configuration>
           </execution>
           <execution>
             <id>compile-proto-${protobuf.version}</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <protoc kind="binary-maven">
+                <version>${protobuf.version}</version>
+              </protoc>
               <excludes>
                 <exclude>DatanodeClientProtocol.proto</exclude>
               </excludes>
               
<outputDirectory>target/generated-sources/proto-java-for-protobuf-${protobuf.version}</outputDirectory>
-              <clearOutputDirectory>false</clearOutputDirectory>
             </configuration>
           </execution>
         </executions>
diff --git a/hadoop-hdds/interface-server/pom.xml 
b/hadoop-hdds/interface-server/pom.xml
index cae5f01b9d3..67c9b1a7415 100644
--- a/hadoop-hdds/interface-server/pom.xml
+++ b/hadoop-hdds/interface-server/pom.xml
@@ -68,45 +68,49 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
+        <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <executions>
           <execution>
             <id>compile-proto-for-ratis</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
-              <goal>compile-custom</goal>
-              <goal>test-compile-custom</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${ratis-thirdparty.protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <protoc kind="binary-maven">
+                <version>${ratis-thirdparty.protobuf.version}</version>
+              </protoc>
               <includes>
                 <include>InterSCMProtocol.proto</include>
                 <include>SCMUpdateProtocol.proto</include>
                 <include>SCMRatisProtocol.proto</include>
               </includes>
+              <incrementalCompilation>false</incrementalCompilation>
               
<outputDirectory>target/generated-sources/proto-java-for-ratis</outputDirectory>
-              <clearOutputDirectory>false</clearOutputDirectory>
-              <pluginId>grpc-java</pluginId>
-              
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${ratis-thirdparty.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+              <plugins>
+                <plugin kind="binary-maven">
+                  <groupId>io.grpc</groupId>
+                  <artifactId>protoc-gen-grpc-java</artifactId>
+                  <version>${ratis-thirdparty.grpc.version}</version>
+                </plugin>
+              </plugins>
             </configuration>
           </execution>
           <execution>
             <id>compile-proto-${protobuf.version}</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <protoc kind="binary-maven">
+                <version>${protobuf.version}</version>
+              </protoc>
               <excludes>
                 <exclude>InterSCMProtocol.proto</exclude>
                 <exclude>SCMUpdateProtocol.proto</exclude>
                 <exclude>SCMRatisProtocol.proto</exclude>
               </excludes>
               
<outputDirectory>target/generated-sources/proto-java-for-protobuf-${protobuf.version}</outputDirectory>
-              <clearOutputDirectory>false</clearOutputDirectory>
             </configuration>
           </execution>
         </executions>
diff --git a/hadoop-hdds/server-scm/pom.xml b/hadoop-hdds/server-scm/pom.xml
index df93d30d142..16b1b6a4a33 100644
--- a/hadoop-hdds/server-scm/pom.xml
+++ b/hadoop-hdds/server-scm/pom.xml
@@ -323,16 +323,18 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
+        <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <configuration>
-          
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+          <protoc kind="binary-maven">
+            <version>${protobuf.version}</version>
+          </protoc>
         </configuration>
         <executions>
           <execution>
             <id>compile-test-protobuf</id>
             <goals>
-              <goal>test-compile</goal>
+              <goal>generate-test</goal>
             </goals>
             <phase>generate-test-sources</phase>
           </execution>
diff --git a/hadoop-ozone/interface-client/pom.xml 
b/hadoop-ozone/interface-client/pom.xml
index 7772c41f9aa..b04bf34a6b6 100644
--- a/hadoop-ozone/interface-client/pom.xml
+++ b/hadoop-ozone/interface-client/pom.xml
@@ -101,23 +101,26 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
+        <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <executions>
           <execution>
             <id>compile-proto-${protobuf.version}</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
-              <goal>compile-custom</goal>
-              <goal>test-compile-custom</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <protoc kind="binary-maven">
+                <version>${protobuf.version}</version>
+              </protoc>
               
<outputDirectory>target/generated-sources/proto-java-protobuf-${protobuf.version}</outputDirectory>
-              <clearOutputDirectory>false</clearOutputDirectory>
-              <pluginId>grpc-java</pluginId>
-              
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${io.grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
+              <plugins>
+                <plugin kind="binary-maven">
+                  <groupId>io.grpc</groupId>
+                  <artifactId>protoc-gen-grpc-java</artifactId>
+                  <version>${io.grpc.version}</version>
+                </plugin>
+              </plugins>
             </configuration>
           </execution>
         </executions>
diff --git a/hadoop-ozone/interface-storage/pom.xml 
b/hadoop-ozone/interface-storage/pom.xml
index 3c2989038f6..baeedcd313b 100644
--- a/hadoop-ozone/interface-storage/pom.xml
+++ b/hadoop-ozone/interface-storage/pom.xml
@@ -99,17 +99,18 @@
         </configuration>
       </plugin>
       <plugin>
-        <groupId>org.xolstice.maven.plugins</groupId>
+        <groupId>io.github.ascopes</groupId>
         <artifactId>protobuf-maven-plugin</artifactId>
         <executions>
           <execution>
             <id>compile-proto-${protobuf.version}</id>
             <goals>
-              <goal>compile</goal>
-              <goal>test-compile</goal>
+              <goal>generate</goal>
             </goals>
             <configuration>
-              
<protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
+              <protoc kind="binary-maven">
+                <version>${protobuf.version}</version>
+              </protoc>
             </configuration>
           </execution>
         </executions>
diff --git a/pom.xml b/pom.xml
index 0c7460cadc9..4f62917b50b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,7 @@
     
<distMgmtStagingUrl>https://repository.apache.org/service/local/staging/deploy/maven2</distMgmtStagingUrl>
     <download-maven-plugin.version>2.1.0</download-maven-plugin.version>
     <dropwizard-metrics.version>3.2.6</dropwizard-metrics.version>
-    <enforced.maven.version>[3.6.3,)</enforced.maven.version>
+    <enforced.maven.version>[3.9.6,)</enforced.maven.version>
     <errorprone-annotations.version>2.29.2</errorprone-annotations.version>
     <errorprone.version>2.42.0</errorprone.version>
     <!-- test groups excluded by default (without any manual profile 
activation) -->
@@ -183,7 +183,7 @@
     <prometheus.version>0.16.0</prometheus.version>
     <properties.maven.plugin.version>1.3.1</properties.maven.plugin.version>
     
<proto-backwards-compatibility.version>1.0.7</proto-backwards-compatibility.version>
-    <protobuf-maven-plugin.version>0.6.1</protobuf-maven-plugin.version>
+    <protobuf-maven-plugin.version>5.1.11</protobuf-maven-plugin.version>
     <protobuf.version>3.25.9</protobuf.version>
     <ranger.version>2.9.0</ranger.version>
     <!-- versions included in ratis-thirdparty, update in sync -->
@@ -1973,6 +1973,9 @@
           <version>${maven-enforcer-plugin.version}</version>
           <configuration>
             <rules>
+              <requireJavaVersion>
+                <version>${ozone.java.version.server}</version>
+              </requireJavaVersion>
               <requireMavenVersion>
                 <version>${enforced.maven.version}</version>
               </requireMavenVersion>
@@ -2277,10 +2280,9 @@
           <version>${jdeb.version}</version>
         </plugin>
         <plugin>
-          <groupId>org.xolstice.maven.plugins</groupId>
+          <groupId>io.github.ascopes</groupId>
           <artifactId>protobuf-maven-plugin</artifactId>
           <version>${protobuf-maven-plugin.version}</version>
-          <extensions>true</extensions>
         </plugin>
       </plugins>
     </pluginManagement>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to