[Maven Cleanup] Remove managed-ledger and zk-utils test-jar dependencies when possible (#6513)
Currently, many modules depend on `managed-ledger-test.jar` just because they want to use MockBookkeeper and MockZookeeper. This made module dependencies hard to understand and track.
This PR introduces a new `testmocks` module and pulls all mocks from managed-ledger tests into the new module.
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml
index 6ccd8b8..a883b83 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests/pom.xml
@@ -59,12 +59,12 @@
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>managed-ledger</artifactId>
+ <groupId>org.apache.pulsar</groupId>
+ <artifactId>testmocks</artifactId>
<version>${project.version}</version>
<scope>test</scope>
- <type>test-jar</type>
</dependency>
+
</dependencies>
</project>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml
index d9c6b3e..cf315c8 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_8/pom.xml
@@ -59,11 +59,10 @@
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>managed-ledger</artifactId>
+ <groupId>org.apache.pulsar</groupId>
+ <artifactId>testmocks</artifactId>
<version>${project.version}</version>
<scope>test</scope>
- <type>test-jar</type>
</dependency>
<dependency>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml
index 6ac87b8..a6de6e3 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka-tests_0_9/pom.xml
@@ -59,11 +59,10 @@
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>managed-ledger</artifactId>
+ <groupId>org.apache.pulsar</groupId>
+ <artifactId>testmocks</artifactId>
<version>${project.version}</version>
<scope>test</scope>
- <type>test-jar</type>
</dependency>
</dependencies>
diff --git a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml
index b1e3105..8d35f2d 100644
--- a/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml
+++ b/pulsar-client-kafka-compat/pulsar-client-kafka_0_8/pom.xml
@@ -66,14 +66,12 @@
</dependency>
<dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>managed-ledger</artifactId>
+ <groupId>org.apache.pulsar</groupId>
+ <artifactId>testmocks</artifactId>
<version>${project.version}</version>
- <type>test-jar</type>
<scope>test</scope>
</dependency>
-
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-client</artifactId>