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: README.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,15 +24,19 @@ The key to enabling A2A in your Java application is to correctly package it. Her
24
24
25
25
### Example
26
26
27
-
The [tck/pom.xml](./tck/pom.xml) is a good example of how to package an A2A application. In this case, the application is deployed in WildFly, so the dependencies included in the `.war` are tailored to what WildFly provides.
27
+
The [tck/pom.xml](./tck/pom.xml) is a good example of how to package an A2A application. Your application can support JSON-RPC, gRPC, or both. In this case, the application is deployed in WildFly, so the dependencies included in the `.war` are tailored to what WildFly provides.
28
28
29
-
In this case we have the following dependencies:
29
+
In the `tck/pom.xml` we enable both JSON-RPC and gRPC, and have the following dependencies:
30
30
31
-
*`org.wildfly.a2a:a2a-java-sdk-jakarta-jsonrpc` - this is the main dependency which transitively pulls in all the dependencies from the A2A Java SDK project.
32
-
* Since some of these dependencies are provided by WildFly already, we exclude those so they do not become part of the `.war`, in order to avoid inconsistencies.
33
-
*`jakarta.ws.rs:jakarta.ws.rs-api` - this is not part of the dependencies brought in via `org.wildfly.a2a:a2a-java-sdk-jakarta-jsonrpc` but is needed to compile the TCK module. Since it is provided by WildFly, we make the scope `provided` so it is not included in the `.war`.
34
-
*`io.github.a2asdk:a2a-tck-server` - this is the application, which contains the `AgentExecutor` and `AgentCard` implementations for the TCK. In your case, they will most likely be implemented in the project you use to create the `.war`.
35
-
* In this case we exclude all transitive dependencies, since we are doing the main dependency management via the `org.wildfly.a2a:a2a-java-sdk-jakarta-jsonrpc` dependency.
31
+
*`org.wildfly.a2a:a2a-java-sdk-jakarta-jsonrpc` - this is the dependency for **JSON-RPC** support. It transitively pulls in all the dependencies from the A2A Java SDK project.
32
+
* Since some of these dependencies are provided by WildFly already, we exclude those so they do not become part of the `.war`, in order to avoid inconsistencies. If you only want to support gRPC, you can omit this dependency.
33
+
*`org.wildfly.a2a:a2a-java-sdk-server-jakarta-grpc` - this is the dependency for **gRPC** support.
34
+
* We exclude the gRPC core libraries (`io.grpc` and `com.google.protobuf:protobuf-java`). This is because when deploying to WildFly with gRPC support, the server is provisioned with the WildFly gRPC feature-pack, which already provides these libraries. Including them in the `.war` would lead to conflicts. If you only want to support JSON-RPC, you can omit this dependency.
35
+
*`jakarta.ws.rs:jakarta.ws.rs-api` - this is not part of the dependencies brought in via the A2A dependencies but is needed to compile the TCK module. Since it is provided by WildFly, we make the scope `provided` so it is not included in the `.war`.
36
+
*`io.github.a2asdk:a2a-tck-server` - this is the application, which contains the `AgentExecutor` and `AgentCard` implementations for the TCK. In your case, they will most likely be implemented in the project you use to create the `.war`.
37
+
* In this case we exclude all transitive dependencies, since we are doing the main dependency management via the `org.wildfly.a2a:a2a-java-sdk-jakarta-jsonrpc` and `org.wildfly.a2a:a2a-java-sdk-server-jakarta-grpc` dependencies.
38
+
39
+
If you are deploying to WildFly and want to use gRPC, you will also need to provision the server with the gRPC feature pack. You can see how this is done in the `wildfly-maven-plugin` configuration in the `tck/pom.xml`. Since the gRPC subsystem and feature pack are currently at the `preview` stability level, you will need to start the server with the `--stability=preview` argument.
0 commit comments