Skip to content

Commit

Permalink
Add jandex-maven-plugin usage to gRPC Getting Started Guide
Browse files Browse the repository at this point in the history
People seem to be running into
#15057 (including myself)
because a Jandex Index is missing, thus we should update the gRPC
Getting Started Guide and mention this.
  • Loading branch information
nastra committed Aug 17, 2021
1 parent 24c62cc commit 931935e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/src/main/asciidoc/grpc-getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -376,3 +376,31 @@ That's why we use the `os-maven-plugin` to target the executable compatible with
NOTE: This configuration instructs the `protobuf-maven-plugin` to generate the default gRPC classes and classes using Mutiny to fit with the Quarkus development experience.

IMPORTANT: When using `protobuf-maven-plugin`, instead of the `quarkus-maven-plugin`, every time you update the `proto` files, you need to re-generate the classes (using `mvn compile`).


== Jandex Index

When gRPC classes are in a dependency of the application, then the dependency needs a Jandex index so that changes to gRPC/proto definitions are picked up properly.
The `jandex-maven-plugin` can be used to create a Jandex index. More information on this topic can be found in the link:cdi-reference#bean_discovery[Bean Discovery] section of the CDI guide.


[source,xml]
----
<build>
<plugins>
<plugin>
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>1.1.0</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
----

0 comments on commit 931935e

Please sign in to comment.