You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vertx-grpc-docs/src/main/asciidoc/plugin.adoc
+64-7Lines changed: 64 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ Using the definition above we need to compile it.
38
38
39
39
You can compile the proto file using the `protoc` compiler if you https://github.com/google/protobuf/tree/master/java#installation---without-maven[like], or you can integrate it in your build.
40
40
41
-
If you're using Apache Maven you need to add the plugin:
41
+
If you're using Apache Maven you can choose from 2 plugins `io.github.ascopes` (Recommended) or `org.xolstice.maven.plugin`:
42
42
43
43
[source,xml]
44
44
----
@@ -60,6 +60,12 @@ If you're using Apache Maven you need to add the plugin:
NOTE: The xolstice is no longer supported as per https://github.com/xolstice/protobuf-maven-plugin/issues/121#issuecomment-2832430955. Users are encouraged to use ascopes plugin.
123
+
124
+
For more details, see the https://www.xolstice.org/protobuf-maven-plugin/[xolstice protobuf-maven-plugin documentation].
125
+
126
+
The `${os.detected.classifier}` property is used to make the build OS independent, on OSX it is replaced
127
+
by _osx-x86_64_ and so on. To use it you need to add the os-maven-plugin[https://github.com/trustin/os-maven-plugin]
128
+
in the `build` section of your `pom.xml`:
129
+
75
130
[source,xml]
76
131
----
77
132
<build>
@@ -104,12 +159,14 @@ By default, the plugin generates both client and service files. If you need only
104
159
105
160
=== Arguments:
106
161
107
-
- _grpc-client_: generate the client files
108
-
- _grpc-service_: generate the service files
109
-
- _grpc-io_: generate stub files compatible with `io.grpc:grpc-stub`, not generated by default. When using this option, you must also ensure the grpc-java plugin is configured (as shown in the Maven configuration above)
110
-
- _grpc-transcoding_: whether to generate transcoding options for methods with HTTP annotations
111
-
- _vertx-codegen_: whether to add Vert.x annotations to the generated classes (`@VertxGen`) By default, this is disabled
112
-
- _service-prefix_: generate service classes with a prefix. For example, if you set it to `MyService`, the generated service class will be `MyServiceGreeterService` instead of `GreeterService`.
162
+
- _[--]grpc-client_: generate the client files
163
+
- _[--]grpc-service_: generate the service files
164
+
- _[--]grpc-io_: generate stub files compatible with `io.grpc:grpc-stub`, not generated by default. When using this option, you must also ensure the grpc-java plugin is configured (as shown in the Maven configuration above)
165
+
- _[--]grpc-transcoding_: whether to generate transcoding options for methods with HTTP annotations
166
+
- _[--]vertx-codegen_: whether to add Vert.x annotations to the generated classes (`@VertxGen`) By default, this is disabled
167
+
- _[--]service-prefix_: generate service classes with a prefix. For example, if you set it to `MyService`, the generated service class will be `MyServiceGreeterService` instead of `GreeterService`.
168
+
169
+
* [--] This means the argument can be prefixed with `--` when used as JVM arguments, but should be used without `--` when specified in the options tag. If possible, users should use plugin options as a more universal protoc plugin approach.
113
170
114
171
If no specific generation options are provided, both client and service files will be generated by default. By default, all extensions (currently only 'http') are supported.
description = "Generate service classes with a prefix. For example, if you set it to `MyService`, the generated service class will be `MyServiceGreeterService` instead of `GreeterService`."
0 commit comments