This is an automated email from the ASF dual-hosted git repository.
mattrpav pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new 56ea235e6e [AMQ-9777] Migrate to using multi-release jar for
activemq-client
56ea235e6e is described below
commit 56ea235e6e481f7408f09101dec7ae77edb40ed1
Author: Matt Pavlovich <[email protected]>
AuthorDate: Thu Oct 2 13:27:23 2025 -0500
[AMQ-9777] Migrate to using multi-release jar for activemq-client
---
activemq-client-jdk21-test/pom.xml | 98 ---------
activemq-client-jdk21/pom.xml | 237 ---------------------
activemq-client/pom.xml | 33 +++
.../activemq/thread/VirtualThreadExecutor.java | 0
.../activemq/thread/VirtualThreadTaskRunner.java | 0
activemq-unit-tests/pom.xml | 28 +++
.../broker/VirtualThreadTaskRunnerBrokerTest.java | 0
assembly/pom.xml | 4 -
assembly/src/main/descriptors/common-bin.xml | 10 -
pom.xml | 48 -----
10 files changed, 61 insertions(+), 397 deletions(-)
diff --git a/activemq-client-jdk21-test/pom.xml
b/activemq-client-jdk21-test/pom.xml
deleted file mode 100644
index 5d7247064d..0000000000
--- a/activemq-client-jdk21-test/pom.xml
+++ /dev/null
@@ -1,98 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-parent</artifactId>
- <version>6.2.0-SNAPSHOT</version>
- </parent>
- <artifactId>activemq-client-jdk21-test</artifactId>
- <packaging>jar</packaging>
- <name>ActiveMQ :: Client JDK 21 Test</name>
- <description>Test module for activemq-client-jdk21 with tech preview
support for Virtual Threads</description>
- <properties>
- <maven.compiler.release>21</maven.compiler.release>
- <maven.compiler.source>21</maven.compiler.source>
- <maven.compiler.target>21</maven.compiler.target>
- <maven.javadoc.skip>true</maven.javadoc.skip>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client-jdk21</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <scope>test</scope>
- <classifier>tests</classifier>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-unit-tests</artifactId>
- <scope>test</scope>
- <classifier>tests</classifier>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>jdk-17-skip</id>
- <activation>
- <jdk>[17,21)</jdk>
- </activation>
- <properties>
- <!-- maven.bundle.skip>true</maven.bundle.skip -->
- <maven.main.skip>true</maven.main.skip>
- <maven.test.skip>true</maven.test.skip>
- </properties>
- </profile>
- <profile>
- <id>jdk-21-plus</id>
- <activation>
- <jdk>[21,)</jdk>
- </activation>
- </profile>
- </profiles>
-</project>
diff --git a/activemq-client-jdk21/pom.xml b/activemq-client-jdk21/pom.xml
deleted file mode 100644
index 5474099455..0000000000
--- a/activemq-client-jdk21/pom.xml
+++ /dev/null
@@ -1,237 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-parent</artifactId>
- <version>6.2.0-SNAPSHOT</version>
- </parent>
- <artifactId>activemq-client-jdk21</artifactId>
- <packaging>bundle</packaging>
- <name>ActiveMQ :: Client JDK 21</name>
- <description>ActiveMQ Client implementation compiled with JDK 21 and tech
preview support for Virtual Threads</description>
- <properties>
- <maven.compiler.release>21</maven.compiler.release>
- <maven.compiler.source>21</maven.compiler.source>
- <maven.compiler.target>21</maven.compiler.target>
- <maven.javadoc.skip>true</maven.javadoc.skip>
- </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>jakarta.jms</groupId>
- <artifactId>jakarta.jms-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>jakarta.jms</groupId>
- <artifactId>jakarta.jms-api</artifactId>
- <version>${jakarta-jms-api-version}</version>
- </dependency>
- <dependency>
- <groupId>org.fusesource.hawtbuf</groupId>
- <artifactId>hawtbuf</artifactId>
- <version>${hawtbuf-version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jmdns</groupId>
- <artifactId>jmdns</artifactId>
- <optional>true</optional>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.thoughtworks.xstream</groupId>
- <artifactId>xstream</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-broker</artifactId>
- <scope>test</scope>
- <classifier>tests</classifier>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-unit-tests</artifactId>
- <scope>test</scope>
- <classifier>tests</classifier>
- <version>${project.version}</version>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>jdk-17-skip</id>
- <activation>
- <jdk>[17,21)</jdk>
- </activation>
- <properties>
- <!-- maven.bundle.skip>true</maven.bundle.skip -->
- <maven.main.skip>true</maven.main.skip>
- </properties>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>jdk-21-plus</id>
- <activation>
- <jdk>[21,)</jdk>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>unpack-source</id>
- <phase>initialize</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <artifactItems>
- <artifactItem>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client</artifactId>
- <classifier>sources</classifier>
- <type>jar</type>
-
<outputDirectory>${project.build.directory}/copied-sources/activemq-client</outputDirectory>
-
<excludes>**/META-INF/*,**/META-INF/maven/**,**/zeroconf/**</excludes>
- <includes>**/**</includes>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-java-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
-
<outputDirectory>${project.build.directory}/generated-sources</outputDirectory>
- <resources>
- <resource>
-
<directory>${project.build.directory}/copied-sources/activemq-client</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- <execution>
- <id>copy-resources</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
-
<outputDirectory>${project.build.directory}/generated-resources/META-INF</outputDirectory>
- <resources>
- <resource>
-
<directory>${project.build.directory}/copied-sources/activemq-client/META-INF</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
-
<source>${project.build.directory}/generated-sources</source>
- </sources>
- </configuration>
- </execution>
- <execution>
- <id>add-resource</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>add-resource</goal>
- </goals>
- <configuration>
- <resources>
- <resource>
-
<directory>${project.build.directory}/generated-resources</directory>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
- <inherited>true</inherited>
- <configuration>
- <instructions>
- <Import-Package>
- !java.*,
- !com.google.errorprone.annotations,
- !com.google.errorprone.annotations.concurrent,
- com.thoughtworks.xstream.*;resolution:="optional",
- *
- </Import-Package>
- <Private-Package>
- com.google.errorprone.annotations,
- com.google.errorprone.annotations.concurrent
- </Private-Package>
- <_noee>true</_noee>
- </instructions>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- </profiles>
-</project>
diff --git a/activemq-client/pom.xml b/activemq-client/pom.xml
index 6b160eb9af..4d6f5a79eb 100644
--- a/activemq-client/pom.xml
+++ b/activemq-client/pom.xml
@@ -200,15 +200,21 @@
<configuration>
<instructions>
<Import-Package>
+ !java.*,
+ !javax.naming*,
+ !javax.net*,
+ !org.apache.activemq*,
!com.google.errorprone.annotations,
!com.google.errorprone.annotations.concurrent,
com.thoughtworks.xstream.*;resolution:="optional",
+ javax.jmdns.*;resolution:="optional",
*
</Import-Package>
<Private-Package>
com.google.errorprone.annotations,
com.google.errorprone.annotations.concurrent
</Private-Package>
+ <Multi-Release>true</Multi-Release>
<_noee>true</_noee>
</instructions>
</configuration>
@@ -396,5 +402,32 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>jdk21-plus</id>
+ <activation>
+ <jdk>[21,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>java21-compile</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <release>21</release> <!-- Specific Java version for
alternative classes -->
+
<compileSourceRoots>${project.basedir}/src/main/java21</compileSourceRoots>
+ <multiReleaseOutput>true</multiReleaseOutput>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git
a/activemq-client-jdk21/src/main/java/org/apache/activemq/thread/VirtualThreadExecutor.java
b/activemq-client/src/main/java21/org/apache/activemq/thread/VirtualThreadExecutor.java
similarity index 100%
rename from
activemq-client-jdk21/src/main/java/org/apache/activemq/thread/VirtualThreadExecutor.java
rename to
activemq-client/src/main/java21/org/apache/activemq/thread/VirtualThreadExecutor.java
diff --git
a/activemq-client-jdk21/src/main/java/org/apache/activemq/thread/VirtualThreadTaskRunner.java
b/activemq-client/src/main/java21/org/apache/activemq/thread/VirtualThreadTaskRunner.java
similarity index 100%
rename from
activemq-client-jdk21/src/main/java/org/apache/activemq/thread/VirtualThreadTaskRunner.java
rename to
activemq-client/src/main/java21/org/apache/activemq/thread/VirtualThreadTaskRunner.java
diff --git a/activemq-unit-tests/pom.xml b/activemq-unit-tests/pom.xml
index eea75d283c..13b53fe40f 100644
--- a/activemq-unit-tests/pom.xml
+++ b/activemq-unit-tests/pom.xml
@@ -1145,5 +1145,33 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>jdk21-plus</id>
+ <activation>
+ <jdk>[21,)</jdk>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-jdk21-test-source</id>
+ <phase>generate-test-sources</phase>
+ <goals>
+ <goal>add-test-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>src/test/java21</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git
a/activemq-client-jdk21-test/src/test/java/org/apache/activemq/broker/VirtualThreadTaskRunnerBrokerTest.java
b/activemq-unit-tests/src/test/java21/org/apache/activemq/broker/VirtualThreadTaskRunnerBrokerTest.java
similarity index 100%
rename from
activemq-client-jdk21-test/src/test/java/org/apache/activemq/broker/VirtualThreadTaskRunnerBrokerTest.java
rename to
activemq-unit-tests/src/test/java21/org/apache/activemq/broker/VirtualThreadTaskRunnerBrokerTest.java
diff --git a/assembly/pom.xml b/assembly/pom.xml
index d87127ed82..03ca26e6f8 100644
--- a/assembly/pom.xml
+++ b/assembly/pom.xml
@@ -41,10 +41,6 @@
<groupId>${project.groupId}</groupId>
<artifactId>activemq-client</artifactId>
</dependency>
- <dependency>
- <groupId>${project.groupId}</groupId>
- <artifactId>activemq-client-jdk21</artifactId>
- </dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-openwire-legacy</artifactId>
diff --git a/assembly/src/main/descriptors/common-bin.xml
b/assembly/src/main/descriptors/common-bin.xml
index b916a0c194..4574d21bc0 100644
--- a/assembly/src/main/descriptors/common-bin.xml
+++ b/assembly/src/main/descriptors/common-bin.xml
@@ -158,16 +158,6 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</dependencySet>
- <dependencySet>
- <outputDirectory>lib/jdk21</outputDirectory>
- <unpack>false</unpack>
- <scope>runtime</scope>
- <includes>
- <include>${pom.groupId}:activemq-client-jdk21</include>
- </includes>
- <fileMode>0644</fileMode>
- <directoryMode>0755</directoryMode>
- </dependencySet>
<dependencySet>
<outputDirectory>lib/camel</outputDirectory>
<unpack>false</unpack>
diff --git a/pom.xml b/pom.xml
index 0472e17ecd..7facafd4c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -275,11 +275,6 @@
<artifactId>activemq-client</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.activemq</groupId>
- <artifactId>activemq-client-jdk21</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
@@ -1457,48 +1452,5 @@
<javadoc.options>-Xdoclint:none</javadoc.options>
</properties>
</profile>
- <profile>
- <id>jdk-21</id>
- <activation>
- <jdk>[21,)</jdk>
- </activation>
- <modules>
- <module>activemq-openwire-generator</module>
- <module>activemq-client</module>
- <module>activemq-client-jdk21</module>
- <module>activemq-client-jdk21-test</module>
- <module>activemq-openwire-legacy</module>
- <module>activemq-broker</module>
- <module>activemq-stomp</module>
- <module>activemq-mqtt</module>
- <module>activemq-amqp</module>
- <module>activemq-kahadb-store</module>
- <module>activemq-jdbc-store</module>
- <module>activemq-unit-tests</module>
- <module>activemq-all</module>
- <module>activemq-console</module>
- <module>activemq-jaas</module>
- <module>activemq-jms-pool</module>
- <module>activemq-pool</module>
- <module>activemq-cf</module>
- <module>activemq-ra</module>
- <module>activemq-rar</module>
- <module>activemq-run</module>
- <module>activemq-shiro</module>
- <module>activemq-spring</module>
- <module>activemq-runtime-config</module>
- <module>activemq-tooling</module>
- <module>activemq-web</module>
- <module>activemq-web-demo</module>
- <module>activemq-web-console</module>
- <module>activemq-karaf</module>
- <module>activemq-osgi</module>
- <module>activemq-blueprint</module>
- <module>activemq-karaf-itest</module>
- <module>assembly</module>
- <module>activemq-log4j-appender</module>
- <module>activemq-http</module>
- </modules>
- </profile>
</profiles>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact