From 0f38db645f8b0c504f4da44f886643f99fde1a0c Mon Sep 17 00:00:00 2001 From: Manfred Baedke Date: Mon, 8 Dec 2025 19:44:09 +0100 Subject: [PATCH] OAK-11975: Use Mockito as an agent in Oak Replaced the dynamic inline mocking with a static agent dependency. --- oak-api/pom.xml | 5 +++++ oak-benchmarks/pom.xml | 4 ++++ oak-blob/pom.xml | 5 +++++ oak-http/pom.xml | 5 +++++ oak-it-osgi/pom.xml | 5 +++++ oak-parent/pom.xml | 17 +++++++++++++++-- oak-segment-tar/pom.xml | 6 ++++++ oak-upgrade/pom.xml | 5 +++++ 8 files changed, 50 insertions(+), 2 deletions(-) diff --git a/oak-api/pom.xml b/oak-api/pom.xml index 92bd0504eed..0a81fbebb0c 100644 --- a/oak-api/pom.xml +++ b/oak-api/pom.xml @@ -84,5 +84,10 @@ junit test + + org.mockito + mockito-core + test + diff --git a/oak-benchmarks/pom.xml b/oak-benchmarks/pom.xml index 495c7be601b..7621885a9df 100644 --- a/oak-benchmarks/pom.xml +++ b/oak-benchmarks/pom.xml @@ -222,6 +222,10 @@ ch.qos.logback logback-classic + + org.mockito + mockito-core + diff --git a/oak-blob/pom.xml b/oak-blob/pom.xml index 131a886d4a2..965f25972b1 100644 --- a/oak-blob/pom.xml +++ b/oak-blob/pom.xml @@ -150,6 +150,11 @@ logback-classic test + + org.mockito + mockito-core + test + diff --git a/oak-http/pom.xml b/oak-http/pom.xml index f2941eb0c55..ee1f6478e54 100644 --- a/oak-http/pom.xml +++ b/oak-http/pom.xml @@ -89,5 +89,10 @@ junit test + + org.mockito + mockito-core + test + diff --git a/oak-it-osgi/pom.xml b/oak-it-osgi/pom.xml index 04dd8004375..540661c909e 100644 --- a/oak-it-osgi/pom.xml +++ b/oak-it-osgi/pom.xml @@ -300,6 +300,11 @@ metrics-core test + + org.mockito + mockito-core + test + diff --git a/oak-parent/pom.xml b/oak-parent/pom.xml index e8bab712107..081dd9636ab 100644 --- a/oak-parent/pom.xml +++ b/oak-parent/pom.xml @@ -261,10 +261,20 @@ true + + maven-dependency-plugin + + + + properties + + + + maven-surefire-plugin - ${test.opts} + ${test.opts} -javaagent:${org.mockito:mockito-core:jar} false