Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down
10 changes: 5 additions & 5 deletions hadoop-hdds/interface-admin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
30 changes: 17 additions & 13 deletions hadoop-hdds/interface-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please set <incrementalCompilation>false</incrementalCompilation> for compile-proto-for-ratis here and in interface-server. A second build without clean skips protoc but runs the shading replacement again, producing org.apache.ratis.thirdparty.org.apache.ratis.thirdparty... and failing compilation. I reproduced this; disabling incremental compilation fixes the failure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

<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>
Expand Down
30 changes: 17 additions & 13 deletions hadoop-hdds/interface-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
8 changes: 5 additions & 3 deletions hadoop-hdds/server-scm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
21 changes: 12 additions & 9 deletions hadoop-ozone/interface-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
9 changes: 5 additions & 4 deletions hadoop-ozone/interface-storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
10 changes: 6 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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) -->
Expand Down Expand Up @@ -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 -->
Expand Down Expand Up @@ -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>
Expand Down Expand Up @@ -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>
Expand Down
Loading