This is an automated email from the ASF dual-hosted git repository. amichair pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/aries-rsa.git
commit ba7951d9afa8e0811bca1dc19caa6080369e0654 Author: Amichai Rothman <[email protected]> AuthorDate: Tue May 19 13:00:34 2026 +0300 ARIES-2222 Migrate ZooKeeper from discontinued servicemix bundles to embedded in discovery bundle --- discovery/zookeeper/bnd.bnd | 22 ++++++- discovery/zookeeper/pom.xml | 76 +++++++++++++--------- features/src/main/resources/features.xml | 1 - itests/felix/pom.xml | 6 -- .../apache/aries/rsa/itests/felix/RsaTestBase.java | 1 - parent/pom.xml | 41 +++--------- 6 files changed, 72 insertions(+), 75 deletions(-) diff --git a/discovery/zookeeper/bnd.bnd b/discovery/zookeeper/bnd.bnd index e8cf8f7c..31b7bca1 100644 --- a/discovery/zookeeper/bnd.bnd +++ b/discovery/zookeeper/bnd.bnd @@ -15,6 +15,24 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + +-split-package:=merge-first +-fixupmessages: "Split package*";is:=ignore + +Export-Package: \ + org.apache.aries.rsa.discovery.zookeeper*,\ + org.apache.zookeeper*;version="${zookeeper.version}",\ + org.apache.jute*;version="${zookeeper.version}" + Import-Package: \ - org.apache.zookeeper.metrics.impl;resolution:=optional,\ - * + !com.fasterxml.jackson.*,\ + io.netty.channel.epoll.*;resolution:=optional,\ + io.netty.channel.kqueue.*;resolution:=optional,\ + io.netty.incubator.*;resolution:=optional,\ + io.netty.internal.tcnative.*;resolution:=optional,\ + io.netty.*,\ + org.slf4j.*,\ + org.osgi.*,\ + javax.security.*,\ + org.apache.aries.rsa.*,\ + *;resolution:=optional diff --git a/discovery/zookeeper/pom.xml b/discovery/zookeeper/pom.xml index 93674ef5..43e144f9 100644 --- a/discovery/zookeeper/pom.xml +++ b/discovery/zookeeper/pom.xml @@ -61,38 +61,12 @@ </dependency> <dependency> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.zookeeper</artifactId> - <exclusions> - <exclusion> - <groupId>com.sun.jdmk</groupId> - <artifactId>jmxtools</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jmx</groupId> - <artifactId>jmxri</artifactId> - </exclusion> - <exclusion> - <artifactId>slf4j-log4j12</artifactId> - <groupId>org.slf4j</groupId> - </exclusion> - <exclusion> - <artifactId>jline</artifactId> - <groupId>jline</groupId> - </exclusion> - <exclusion> - <artifactId>netty</artifactId> - <groupId>io.netty</groupId> - </exclusion> - <exclusion> - <artifactId>log4j</artifactId> - <groupId>log4j</groupId> - </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> - </exclusions> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + </dependency> + <dependency> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper-jute</artifactId> </dependency> <dependency> <groupId>io.dropwizard.metrics</groupId> @@ -121,4 +95,42 @@ </dependency> </dependencies> + <build> + <plugins> + <!-- + ZooKeeper artifacts have no OSGi support, and the two inter-dependent bundles + (zookeeper and zookeeper-jute) make them difficult to just wrap, so we embed + them into our discovery bundle + --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack-zookeeper</id> + <phase>generate-resources</phase> + <goals> + <goal>unpack</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + <outputDirectory>${project.build.outputDirectory}</outputDirectory> + </artifactItem> + <artifactItem> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper-jute</artifactId> + <outputDirectory>${project.build.outputDirectory}</outputDirectory> + </artifactItem> + </artifactItems> + <excludes>META-INF/**</excludes> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </project> diff --git a/features/src/main/resources/features.xml b/features/src/main/resources/features.xml index 3c98c196..be425d12 100644 --- a/features/src/main/resources/features.xml +++ b/features/src/main/resources/features.xml @@ -57,7 +57,6 @@ <feature name="aries-rsa-discovery-zookeeper" version="${project.version}"> <feature>aries-rsa-core</feature> - <bundle>mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.zookeeper/${zookeeper.version}</bundle> <bundle>mvn:org.apache.aries.rsa.discovery/org.apache.aries.rsa.discovery.local/${project.version}</bundle> <bundle>mvn:org.apache.aries.rsa.discovery/org.apache.aries.rsa.discovery.zookeeper/${project.version}</bundle> diff --git a/itests/felix/pom.xml b/itests/felix/pom.xml index 7f79beef..0ce86448 100644 --- a/itests/felix/pom.xml +++ b/itests/felix/pom.xml @@ -282,12 +282,6 @@ <classifier>uber</classifier> <scope>test</scope> </dependency> - - <dependency> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.zookeeper</artifactId> - <scope>test</scope> - </dependency> </dependencies> <build> diff --git a/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java b/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java index 3b243654..16953767 100644 --- a/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java +++ b/itests/felix/src/test/java/org/apache/aries/rsa/itests/felix/RsaTestBase.java @@ -179,7 +179,6 @@ public class RsaTestBase { mvn("io.netty", "netty-codec"), mvn("io.dropwizard.metrics", "metrics-core"), mvn("org.xerial.snappy", "snappy-java"), - mvn("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.zookeeper"), mvn("org.apache.aries.rsa.discovery", "org.apache.aries.rsa.discovery.zookeeper")); } diff --git a/parent/pom.xml b/parent/pom.xml index 6cc7eb33..4f348172 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -34,7 +34,7 @@ <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <bnd.version>7.2.3</bnd.version> - <zookeeper.version>3.9.3_1</zookeeper.version> + <zookeeper.version>3.9.3</zookeeper.version> <netty.version>4.1.121.Final</netty.version> <slf4j.version>2.0.18</slf4j.version> <logback.version>1.5.32</logback.version> @@ -242,39 +242,14 @@ <scope>test</scope> </dependency> <dependency> - <groupId>org.apache.servicemix.bundles</groupId> - <artifactId>org.apache.servicemix.bundles.zookeeper</artifactId> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper</artifactId> + <version>${zookeeper.version}</version> + </dependency> + <dependency> + <groupId>org.apache.zookeeper</groupId> + <artifactId>zookeeper-jute</artifactId> <version>${zookeeper.version}</version> - <exclusions> - <exclusion> - <groupId>com.sun.jdmk</groupId> - <artifactId>jmxtools</artifactId> - </exclusion> - <exclusion> - <groupId>com.sun.jmx</groupId> - <artifactId>jmxri</artifactId> - </exclusion> - <exclusion> - <artifactId>slf4j-log4j12</artifactId> - <groupId>org.slf4j</groupId> - </exclusion> - <exclusion> - <artifactId>jline</artifactId> - <groupId>jline</groupId> - </exclusion> - <exclusion> - <artifactId>netty</artifactId> - <groupId>io.netty</groupId> - </exclusion> - <exclusion> - <artifactId>log4j</artifactId> - <groupId>log4j</groupId> - </exclusion> - <exclusion> - <groupId>io.netty</groupId> - <artifactId>netty</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>io.dropwizard.metrics</groupId>
