Skip to content

Commit a952c80

Browse files
committed
Replace protobuf-maven-plugin with ascopes-protobuf-maven-plugin
Motivation: - Replace `protobuf-maven-plugin` with `ascopes-protobuf-maven-plugin` across modules and update configurations. Changes: - Replace plugin in vertx-grpc-common, vertx-grpc-docs, vertx-grpc-health, vertx-grpc-reflection, vertx-grpc-server, vertx-grpcio-context-storage Signed-off-by: Daniel Fiala <[email protected]>
1 parent b73f995 commit a952c80

File tree

7 files changed

+44
-42
lines changed

7 files changed

+44
-42
lines changed

pom.xml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
<jprotoc.version>1.2.2</jprotoc.version>
2525
<protoc.version>4.29.3</protoc.version>
2626
<protobuf.version>4.29.3</protobuf.version>
27+
<!-- NOTE: We need to stay on version 3.x of ascopes protobuf maven plugin until we bump minimum version of java from
28+
java 11 to java 17 as starting from 4.x minimum required version is java 17.
29+
See: https://ascopes.github.io/protobuf-maven-plugin/plugin-info.html#system-requirements-history
30+
-->
31+
<protobuf.maven.plugin.version>3.10.2</protobuf.maven.plugin.version>
2732
<jmh.version>1.37</jmh.version>
2833
</properties>
2934

@@ -220,13 +225,6 @@
220225
</modules>
221226

222227
<build>
223-
<extensions>
224-
<extension>
225-
<groupId>kr.motd.maven</groupId>
226-
<artifactId>os-maven-plugin</artifactId>
227-
<version>1.7.1</version>
228-
</extension>
229-
</extensions>
230228
<pluginManagement>
231229
<plugins>
232230
<plugin>
@@ -247,30 +245,29 @@
247245
</execution>
248246
</executions>
249247
</plugin>
250-
<plugin>
251-
<groupId>org.xolstice.maven.plugins</groupId>
252-
<artifactId>protobuf-maven-plugin</artifactId>
253-
<version>0.6.1</version>
254-
<configuration>
255-
<!--
256-
The version of protoc must match protobuf-java. If you don't depend on
257-
protobuf-java directly, you will be transitively depending on the
258-
protobuf-java version that grpc depends on.
259-
-->
260-
<protocArtifact>com.google.protobuf:protoc:${protoc.version}:exe:${os.detected.classifier}</protocArtifact>
261-
<pluginId>grpc-java</pluginId>
262-
<pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact>
263-
<!-- Skip generating @javax.annotation.Generated which creates split packages -->
264-
<pluginParameter>@generated=omit</pluginParameter>
265-
</configuration>
266-
</plugin>
267248
<plugin>
268249
<groupId>io.github.ascopes</groupId>
269250
<artifactId>protobuf-maven-plugin</artifactId>
270-
<version>3.8.2</version>
251+
<version>${protobuf.maven.plugin.version}</version>
271252
<configuration>
272253
<protocVersion>${protobuf.version}</protocVersion>
273254
</configuration>
255+
<executions>
256+
<execution>
257+
<id>test-compile</id>
258+
<configuration>
259+
<binaryMavenPlugins>
260+
<binaryMavenPlugin>
261+
<groupId>io.grpc</groupId>
262+
<artifactId>protoc-gen-grpc-java</artifactId>
263+
<version>${grpc.version}</version>
264+
<!-- Skip generating @javax.annotation.Generated which creates split packages -->
265+
<options>@generated=omit</options>
266+
</binaryMavenPlugin>
267+
</binaryMavenPlugins>
268+
</configuration>
269+
</execution>
270+
</executions>
274271
</plugin>
275272
</plugins>
276273
</pluginManagement>

vertx-grpc-common/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,13 @@
5959
<build>
6060
<plugins>
6161
<plugin>
62-
<groupId>org.xolstice.maven.plugins</groupId>
62+
<groupId>io.github.ascopes</groupId>
6363
<artifactId>protobuf-maven-plugin</artifactId>
6464
<executions>
6565
<execution>
6666
<id>test-compile</id>
6767
<goals>
68-
<goal>test-compile</goal>
69-
<goal>test-compile-custom</goal>
68+
<goal>generate-test</goal>
7069
</goals>
7170
</execution>
7271
</executions>

vertx-grpc-docs/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,16 @@
116116
<goal>generate</goal>
117117
</goals>
118118
</execution>
119+
<execution>
120+
<id>test-compile</id>
121+
<goals>
122+
<goal>generate-test</goal>
123+
</goals>
124+
<configuration>
125+
<sourceDirectories>${project.basedir}/src/main/proto</sourceDirectories>
126+
<javaEnabled>false</javaEnabled>
127+
</configuration>
128+
</execution>
119129
</executions>
120130
</plugin>
121131
<plugin>

vertx-grpc-health/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,19 @@
8585
<build>
8686
<plugins>
8787
<plugin>
88-
<groupId>org.xolstice.maven.plugins</groupId>
88+
<groupId>io.github.ascopes</groupId>
8989
<artifactId>protobuf-maven-plugin</artifactId>
9090
<executions>
9191
<execution>
9292
<id>test-compile</id>
9393
<goals>
94-
<goal>test-compile</goal>
95-
<goal>test-compile-custom</goal>
94+
<goal>generate-test</goal>
9695
</goals>
9796
</execution>
9897
<execution>
9998
<id>compile</id>
10099
<goals>
101-
<goal>compile</goal>
100+
<goal>generate</goal>
102101
</goals>
103102
</execution>
104103
</executions>

vertx-grpc-reflection/pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,19 @@
8585
<build>
8686
<plugins>
8787
<plugin>
88-
<groupId>org.xolstice.maven.plugins</groupId>
88+
<groupId>io.github.ascopes</groupId>
8989
<artifactId>protobuf-maven-plugin</artifactId>
9090
<executions>
9191
<execution>
9292
<id>test-compile</id>
9393
<goals>
94-
<goal>test-compile</goal>
95-
<goal>test-compile-custom</goal>
94+
<goal>generate-test</goal>
9695
</goals>
9796
</execution>
9897
<execution>
9998
<id>compile</id>
10099
<goals>
101-
<goal>compile</goal>
100+
<goal>generate</goal>
102101
</goals>
103102
</execution>
104103
</executions>

vertx-grpc-server/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,13 @@
8383
<build>
8484
<plugins>
8585
<plugin>
86-
<groupId>org.xolstice.maven.plugins</groupId>
86+
<groupId>io.github.ascopes</groupId>
8787
<artifactId>protobuf-maven-plugin</artifactId>
8888
<executions>
8989
<execution>
9090
<id>test-compile</id>
9191
<goals>
92-
<goal>test-compile</goal>
93-
<goal>test-compile-custom</goal>
92+
<goal>generate-test</goal>
9493
</goals>
9594
</execution>
9695
</executions>

vertx-grpcio-context-storage/pom.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,13 @@
5656
<build>
5757
<plugins>
5858
<plugin>
59-
<groupId>org.xolstice.maven.plugins</groupId>
59+
<groupId>io.github.ascopes</groupId>
6060
<artifactId>protobuf-maven-plugin</artifactId>
6161
<executions>
6262
<execution>
6363
<id>test-compile</id>
6464
<goals>
65-
<goal>test-compile</goal>
66-
<goal>test-compile-custom</goal>
65+
<goal>generate-test</goal>
6766
</goals>
6867
</execution>
6968
</executions>

0 commit comments

Comments
 (0)