Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions a2a/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
<slf4j.version>2.0.17</slf4j.version>
<truth.version>1.4.4</truth.version>
<junit4.version>4.13.2</junit4.version>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely on
runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencies>
Expand Down
6 changes: 6 additions & 0 deletions contrib/firestore-session-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<name>Agent Development Kit - Firestore Session Management</name>
<description>Firestore integration with Agent Development Kit for User Session Management</description>

<properties>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely
on runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencies>

Expand Down Expand Up @@ -90,6 +95,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>
${mockito.javaagent.arg}
${jacoco.agent.argLine}
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
Expand Down
5 changes: 5 additions & 0 deletions contrib/langchain4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<name>Agent Development Kit - LangChain4j</name>
<description>LangChain4j integration for the Agent Development Kit.</description>

<properties>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely
on runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencyManagement>
<dependencies>
Expand Down
6 changes: 6 additions & 0 deletions contrib/planners/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
<name>Agent Development Kit - Planners</name>
<description>Built-in planner implementations for the ADK PlannerAgent, including GOAP (Goal-Oriented Action Planning), P2P (Peer-to-Peer), and Supervisor planners.</description>

<properties>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely
on runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencies>
<!-- Main dependencies -->
<dependency>
Expand Down
3 changes: 3 additions & 0 deletions contrib/spring-ai/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
<properties>
<spring-ai.version>2.0.1</spring-ai.version>
<testcontainers.version>1.21.3</testcontainers.version>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely
on runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencyManagement>
Expand Down
6 changes: 5 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
<name>Agent Development Kit</name>
<description>Agent Development Kit: an open-source, code-first toolkit designed to simplify building, evaluating, and deploying advanced AI agents anywhere.</description>


<properties>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely on
runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencies>
<dependency>
Expand Down
5 changes: 5 additions & 0 deletions dev/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<name>Agent Development Kit - Dev Tools</name>
<description>Development tools and server for Agent Development Kit.</description>

<properties>
<!-- Load mockito-core as a startup -javaagent so the inline mock maker does not rely on
runtime self-attachment, which newer JDKs block. -->
<mockito.javaagent.arg>-javaagent:${org.mockito:mockito-core:jar}</mockito.javaagent.arg>
</properties>

<dependencyManagement>
<dependencies>
Expand Down
24 changes: 23 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,12 @@
<maven-plugin-tools.version>3.9.0</maven-plugin-tools.version>
<httpclient5.version>5.6.1</httpclient5.version>
<netty.version>4.1.118.Final</netty.version>
<surefire.argLine>@{jacoco.agent.argLine} --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true</surefire.argLine>
<!-- Prepended to the surefire JVM args. Empty by default; any module whose tests resolve
mockito-core (directly or transitively) must set it to
"-javaagent:${org.mockito:mockito-core:jar}" so the inline mock maker loads as a
startup agent instead of self-attaching at runtime, which newer JDKs block. -->
<mockito.javaagent.arg></mockito.javaagent.arg>
<surefire.argLine>${mockito.javaagent.arg} @{jacoco.agent.argLine} --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/jdk.internal.misc=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true</surefire.argLine>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -492,6 +497,23 @@
</execution>
</executions>
</plugin>
<plugin>
<!-- Exposes each resolved dependency's jar path as a ${groupId:artifactId:type}
property, so surefire can load mockito-core as a -javaagent (see
mockito.javaagent.arg). -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.8.1</version>
<executions>
<execution>
<id>resolve-dependency-paths</id>
<phase>initialize</phase>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand Down
Loading