Skip to content

Commit 813c013

Browse files
kabirclaudeehsavoie
authored
refactor: extract AgentExecutorProducer_v0_3 into separate test module (#890)
* refactor: extract AgentExecutorProducer_v0_3 into separate test module Move AgentExecutorProducer_v0_3 from compat-0.3/server-conversion test-jar into a new compat-0.3/tests/server-common module to fix CDI ambiguous dependency errors in downstream consumers that depend on both the v0.3 and v1.0 test-jars. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Avoiding creating an empty jar file Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com> --------- Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Emmanuel Hugonnet <ehugonne@redhat.com>
1 parent 8352169 commit 813c013

10 files changed

Lines changed: 93 additions & 8 deletions

File tree

boms/reference/src/it/reference-usage-test/src/main/java/org/a2aproject/sdk/test/ReferenceBomVerifier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ public class ReferenceBomVerifier extends DynamicBomVerifier {
1919
"test-utils-docker/", // Test utilities for Docker-based tests
2020
"compat-0.3/client/", // Compat 0.3 client modules (part of SDK BOM)
2121
"compat-0.3/http-client/", // Compat 0.3 HTTP client (part of SDK BOM)
22-
"compat-0.3/tck/" // Compat 0.3 TCK (not yet enabled)
22+
"compat-0.3/tck/", // Compat 0.3 TCK (not yet enabled)
23+
"compat-0.3/tests/" // Compat 0.3 test utilities
2324
// Note: reference/ and compat-0.3/reference/ are NOT excluded - we verify those classes load
2425
);
2526

boms/sdk/src/it/sdk-usage-test/src/main/java/org/a2aproject/sdk/test/SdkBomVerifier.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
public class SdkBomVerifier extends DynamicBomVerifier {
1313

1414
private static final Set<String> SDK_EXCLUSIONS = Set.of(
15-
"boms/", // BOM test modules themselves
16-
"examples/", // Example applications
17-
"tck/", // TCK test suite
18-
"compat-0.3/tck/", // Compat 0.3 TCK (not yet enabled)
15+
"boms/", // BOM test modules themselves
16+
"examples/", // Example applications
17+
"tck/", // TCK test suite
18+
"compat-0.3/tck/", // Compat 0.3 TCK (not yet enabled)
1919
"compat-0.3/reference/", // Compat 0.3 reference implementations (in reference BOM)
20-
"tests/", // Integration tests
21-
"test-utils-docker/" // Test utilities for Docker-based tests
20+
"compat-0.3/tests/", // Compat 0.3 test utilities)
21+
"tests/", // Integration tests
22+
"test-utils-docker/" // Test utilities for Docker-based tests
2223
);
2324

2425
private static final Set<String> SDK_FORBIDDEN = Set.of(

compat-0.3/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@
105105
<type>test-jar</type>
106106
<version>${project.version}</version>
107107
</dependency>
108+
<dependency>
109+
<groupId>${project.groupId}</groupId>
110+
<artifactId>a2a-java-sdk-compat-0.3-tests-server-common</artifactId>
111+
<version>${project.version}</version>
112+
</dependency>
108113
</dependencies>
109114
</dependencyManagement>
110115

@@ -116,6 +121,9 @@
116121
<!-- Server conversion (0.3 to 1.0 translation layer) -->
117122
<module>server-conversion</module>
118123

124+
<!-- Test infrastructure -->
125+
<module>tests/server-common</module>
126+
119127
<!-- Client modules -->
120128
<module>client/base</module>
121129
<module>client/transport/spi</module>

compat-0.3/reference/grpc/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@
5252
<type>test-jar</type>
5353
<scope>test</scope>
5454
</dependency>
55+
<dependency>
56+
<groupId>${project.groupId}</groupId>
57+
<artifactId>a2a-java-sdk-compat-0.3-tests-server-common</artifactId>
58+
<scope>test</scope>
59+
</dependency>
5560
<!-- Client for testing -->
5661
<dependency>
5762
<groupId>${project.groupId}</groupId>
@@ -131,4 +136,4 @@
131136
</plugin>
132137
</plugins>
133138
</build>
134-
</project>
139+
</project>

compat-0.3/reference/jsonrpc/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@
3737
<type>test-jar</type>
3838
<scope>test</scope>
3939
</dependency>
40+
<dependency>
41+
<groupId>${project.groupId}</groupId>
42+
<artifactId>a2a-java-sdk-compat-0.3-tests-server-common</artifactId>
43+
<scope>test</scope>
44+
</dependency>
4045
<!-- Client for testing -->
4146
<dependency>
4247
<groupId>${project.groupId}</groupId>

compat-0.3/reference/rest/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
<type>test-jar</type>
3434
<scope>test</scope>
3535
</dependency>
36+
<dependency>
37+
<groupId>${project.groupId}</groupId>
38+
<artifactId>a2a-java-sdk-compat-0.3-tests-server-common</artifactId>
39+
<scope>test</scope>
40+
</dependency>
3641
<!-- Client for testing -->
3742
<dependency>
3843
<groupId>${project.groupId}</groupId>
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
<?xml version="1.0"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>org.a2aproject.sdk</groupId>
9+
<artifactId>a2a-java-sdk-compat-0.3-parent</artifactId>
10+
<version>1.0.0.CR2-SNAPSHOT</version>
11+
<relativePath>../../pom.xml</relativePath>
12+
</parent>
13+
<artifactId>a2a-java-sdk-compat-0.3-tests-server-common</artifactId>
14+
15+
<packaging>jar</packaging>
16+
17+
<name>Java A2A Compat 0.3 Server Tests Common</name>
18+
<description>Java SDK for the Agent2Agent Protocol (A2A) - Compat 0.3 Server Tests Common</description>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>${project.groupId}</groupId>
23+
<artifactId>a2a-java-sdk-spec</artifactId>
24+
</dependency>
25+
<dependency>
26+
<groupId>${project.groupId}</groupId>
27+
<artifactId>a2a-java-sdk-server-common</artifactId>
28+
</dependency>
29+
<dependency>
30+
<groupId>jakarta.enterprise</groupId>
31+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
32+
<scope>provided</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>io.quarkus</groupId>
36+
<artifactId>quarkus-arc</artifactId>
37+
<scope>provided</scope>
38+
</dependency>
39+
</dependencies>
40+
41+
<build>
42+
<plugins>
43+
<plugin>
44+
<groupId>org.sonatype.central</groupId>
45+
<artifactId>central-publishing-maven-plugin</artifactId>
46+
<extensions>true</extensions>
47+
<configuration>
48+
<skipPublishing>true</skipPublishing>
49+
</configuration>
50+
</plugin>
51+
</plugins>
52+
</build>
53+
</project>

compat-0.3/server-conversion/src/test/java/org/a2aproject/sdk/compat03/conversion/AgentExecutorProducer_v0_3.java renamed to compat-0.3/tests/server-common/src/main/java/org/a2aproject/sdk/compat03/conversion/AgentExecutorProducer_v0_3.java

File renamed without changes.

compat-0.3/server-conversion/src/test/java/org/a2aproject/sdk/compat03/conversion/RequestScopedBean_v0_3.java renamed to compat-0.3/tests/server-common/src/main/java/org/a2aproject/sdk/compat03/conversion/RequestScopedBean_v0_3.java

File renamed without changes.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
5+
version="4.0"
6+
bean-discovery-mode="all">
7+
</beans>

0 commit comments

Comments
 (0)