From e10d457868f851af96e9aa899c8840c0d5514d76 Mon Sep 17 00:00:00 2001 From: Matt Pavlovich Date: Thu, 13 Apr 2023 09:27:31 -0500 Subject: [PATCH] [AMQ-9239] jakarta.jms - assembly changes --- activemq-all/pom.xml | 4 +- assembly/pom.xml | 45 +++++++++++++------ assembly/src/main/descriptors/common-bin.xml | 31 ++++++++----- assembly/src/release/conf/jetty.xml | 3 ++ .../src/release/examples/amqp/java/pom.xml | 8 ++-- .../java/src/main/java/example/Listener.java | 2 +- .../java/src/main/java/example/Publisher.java | 2 +- .../release/examples/conf/activemq-demo.xml | 2 +- .../src/release/examples/conf/jetty-demo.xml | 5 ++- .../src/release/examples/mqtt/java/pom.xml | 6 +-- .../java/example/composite/dest/Consumer.java | 2 +- .../java/example/composite/dest/Producer.java | 2 +- .../java/example/topic/durable/Publisher.java | 2 +- .../example/topic/durable/Subscriber.java | 2 +- .../example/queue/exclusive/Consumer.java | 2 +- .../example/queue/exclusive/Producer.java | 2 +- .../main/java/example/browser/Browser.java | 2 +- .../main/java/example/browser/Producer.java | 2 +- .../java/example/queue/selector/Consumer.java | 2 +- .../java/example/queue/selector/Producer.java | 2 +- .../src/main/java/example/queue/Consumer.java | 2 +- .../src/main/java/example/queue/Producer.java | 2 +- .../main/java/example/tempdest/Consumer.java | 2 +- .../tempdest/ProducerRequestReply.java | 2 +- .../main/java/example/topic/Publisher.java | 2 +- .../main/java/example/topic/Subscriber.java | 2 +- .../main/java/example/transaction/Client.java | 2 +- .../main/java/example/wildcard/Client.java | 2 +- .../openwire/advanced-scenarios/pom.xml | 25 +++++++---- .../release/examples/openwire/java/pom.xml | 8 ++-- .../java/src/main/java/example/Listener.java | 2 +- .../java/src/main/java/example/Publisher.java | 2 +- .../src/release/examples/stomp/java/pom.xml | 6 +-- .../java/src/main/java/example/Listener.java | 8 +++- .../java/src/main/java/example/Publisher.java | 8 +++- .../src/release/webapps/api/WEB-INF/web.xml | 17 +++++-- .../activemq/benchmark/BenchmarkSupport.java | 8 ++-- .../apache/activemq/benchmark/Consumer.java | 16 +++---- .../apache/activemq/benchmark/Producer.java | 12 ++--- .../config/BrokerXmlConfigStartTest.java | 6 ++- 40 files changed, 159 insertions(+), 103 deletions(-) diff --git a/activemq-all/pom.xml b/activemq-all/pom.xml index d45d72a82f..55dc5bb8b1 100644 --- a/activemq-all/pom.xml +++ b/activemq-all/pom.xml @@ -56,8 +56,8 @@ activemq-jdbc-store - org.apache.geronimo.specs - geronimo-annotation_1.3_spec + jakarta.annotation + jakarta.annotation-api org.apache.logging.log4j diff --git a/assembly/pom.xml b/assembly/pom.xml index d1d30d44f9..a5b44bcf21 100644 --- a/assembly/pom.xml +++ b/assembly/pom.xml @@ -232,24 +232,24 @@ jakarta.jms-api - org.apache.geronimo.specs - geronimo-j2ee-connector_1.5_spec + jakarta.resource + jakarta.resource-api org.apache.geronimo.specs geronimo-jacc_1.1_spec - - org.apache.tomcat - tomcat-servlet-api - - - org.apache.tomcat - tomcat-websocket-api - - org.apache.geronimo.specs - geronimo-jta_1.1_spec + jakarta.servlet + jakarta.servlet-api + + + jakarta.websocket + jakarta.websocket-api + + + jakarta.transaction + jakarta.transaction-api org.apache.shiro @@ -268,6 +268,10 @@ org.springframework spring-aop + + org.springframework + spring-expression + org.springframework spring-jms @@ -342,8 +346,8 @@ jcl-over-slf4j - org.apache.geronimo.specs - geronimo-annotation_1.3_spec + jakarta.annotation + jakarta.annotation-api org.ow2.asm @@ -357,6 +361,17 @@ org.eclipse.jetty apache-jstl + 11.0.0 + + + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + 3.0.0 + + + org.glassfish.web + jakarta.servlet.jsp.jstl + 3.0.1 org.jasypt @@ -389,11 +404,13 @@ xmlParserAPIs 2.6.2 + com.googlecode.json-simple json-simple diff --git a/assembly/src/main/descriptors/common-bin.xml b/assembly/src/main/descriptors/common-bin.xml index ff9c509459..9b2f298b95 100644 --- a/assembly/src/main/descriptors/common-bin.xml +++ b/assembly/src/main/descriptors/common-bin.xml @@ -142,7 +142,7 @@ ${pom.groupId}:activemq-jaas org.apache.activemq.protobuf:activemq-protobuf jakarta.jms:jakarta.jms-api - org.apache.geronimo.specs:geronimo-jta_1.1_spec + jakarta.transaction:jakarta.transaction-api ${pom.groupId}:activemq-web org.fusesource.hawtbuf:hawtbuf javax.xml.bind:jaxb-api @@ -157,6 +157,7 @@ 0644 0755 + lib/optional false @@ -193,7 +195,7 @@ org.apache.logging.log4j:log4j-slf4j2-impl org.apache.logging.log4j:log4j-api org.apache.logging.log4j:log4j-core - org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec + jakarta.resource:jakarta.resource-api org.apache.httpcomponents:httpclient org.apache.httpcomponents:httpcore org.apache.xbean:xbean-spring @@ -253,18 +255,21 @@ org.eclipse.jetty:jetty-util org.eclipse.jetty:jetty-http org.eclipse.jetty:jetty-io + org.eclipse.jetty:jetty-jndi org.eclipse.jetty:jetty-plus org.eclipse.jetty:jetty-servlet org.eclipse.jetty:jetty-security org.eclipse.jetty:jetty-rewrite - org.eclipse.jetty:jetty-continuation - org.eclipse.jetty.websocket:websocket-api - org.eclipse.jetty.websocket:websocket-common - org.eclipse.jetty.websocket:websocket-server + org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api + org.eclipse.jetty.websocket:websocket-core-common + org.eclipse.jetty.websocket:websocket-core-server + org.eclipse.jetty.websocket:websocket-jetty-api + org.eclipse.jetty.websocket:websocket-jetty-common + org.eclipse.jetty.websocket:websocket-jetty-server org.eclipse.jetty.websocket:websocket-servlet org.eclipse.jetty.orbit:javax.security.auth.message - org.apache.tomcat:tomcat-servlet-api - org.apache.tomcat:tomcat-websocket-api + + jakarta.websocket:jakarta.websocket-api @@ -273,12 +278,14 @@ org.mortbay.jasper:apache-jsp org.eclipse.jetty:apache-jstl - org.apache.taglibs:taglibs-standard-spec + jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api + org.glassfish.web:jakarta.servlet.jsp.jstl + org.mortbay.jasper:apache-el - org.apache.taglibs:taglibs-standard-impl + - org.apache.geronimo.specs:geronimo-annotation_1.3_spec + jakarta.annotation:jakarta.annotation-api org.ow2.asm:asm org.eclipse.jdt:ecj @@ -288,7 +295,7 @@ org.jdom:jdom2 - org.jolokia:jolokia-core + com.googlecode.json-simple:json-simple 0644 diff --git a/assembly/src/release/conf/jetty.xml b/assembly/src/release/conf/jetty.xml index 4663fd006d..6ce53142fa 100644 --- a/assembly/src/release/conf/jetty.xml +++ b/assembly/src/release/conf/jetty.xml @@ -43,7 +43,10 @@ + + diff --git a/assembly/src/release/examples/amqp/java/pom.xml b/assembly/src/release/examples/amqp/java/pom.xml index d257ab3e7a..62827abac7 100644 --- a/assembly/src/release/examples/amqp/java/pom.xml +++ b/assembly/src/release/examples/amqp/java/pom.xml @@ -31,7 +31,7 @@ jakarta.jms jakarta.jms-api - 2.0.3 + ${jakarta-jms-api-version} org.apache.qpid @@ -46,10 +46,10 @@ org.apache.maven.plugins maven-compiler-plugin - 2.1 + ${maven-compiler-plugin-version} - 1.8 - 1.8 + ${source-version} + ${target-version} diff --git a/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java b/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java index 4598d5b4ab..c01b67875f 100644 --- a/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java +++ b/assembly/src/release/examples/amqp/java/src/main/java/example/Listener.java @@ -17,7 +17,7 @@ package example; import org.apache.qpid.jms.*; -import javax.jms.*; +import jakarta.jms.*; class Listener { diff --git a/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java b/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java index ec0fe1e04c..d289331ea8 100644 --- a/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java +++ b/assembly/src/release/examples/amqp/java/src/main/java/example/Publisher.java @@ -17,7 +17,7 @@ package example; import org.apache.qpid.jms.*; -import javax.jms.*; +import jakarta.jms.*; class Publisher { diff --git a/assembly/src/release/examples/conf/activemq-demo.xml b/assembly/src/release/examples/conf/activemq-demo.xml index 8d050d2181..a6954cf2f1 100644 --- a/assembly/src/release/examples/conf/activemq-demo.xml +++ b/assembly/src/release/examples/conf/activemq-demo.xml @@ -208,8 +208,8 @@ For more details see http://activemq.apache.org/enterprise-integration-patterns.html - --> + --> - + Apache ActiveMQ REST API @@ -36,9 +37,11 @@ --> + + + MessageServlet /message/* + diff --git a/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java b/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java index 29c1c8616b..edfcd087a8 100644 --- a/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java +++ b/assembly/src/test/java/org/apache/activemq/benchmark/BenchmarkSupport.java @@ -21,10 +21,10 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; -import javax.jms.Connection; -import javax.jms.Destination; -import javax.jms.JMSException; -import javax.jms.Session; +import jakarta.jms.Connection; +import jakarta.jms.Destination; +import jakarta.jms.JMSException; +import jakarta.jms.Session; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.activemq.util.IdGenerator; diff --git a/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java b/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java index c213b71b90..ec8b1ee6bb 100644 --- a/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java +++ b/assembly/src/test/java/org/apache/activemq/benchmark/Consumer.java @@ -16,14 +16,14 @@ */ package org.apache.activemq.benchmark; -import javax.jms.Destination; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageConsumer; -import javax.jms.MessageListener; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.jms.Topic; +import jakarta.jms.Destination; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.MessageListener; +import jakarta.jms.Session; +import jakarta.jms.TextMessage; +import jakarta.jms.Topic; /** * @author James Strachan diff --git a/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java b/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java index ea168063dc..5ece08a67c 100644 --- a/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java +++ b/assembly/src/test/java/org/apache/activemq/benchmark/Producer.java @@ -21,12 +21,12 @@ import java.io.File; import java.io.FileReader; import java.io.IOException; -import javax.jms.DeliveryMode; -import javax.jms.Destination; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.MessageProducer; -import javax.jms.Session; +import jakarta.jms.DeliveryMode; +import jakarta.jms.Destination; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.MessageProducer; +import jakarta.jms.Session; /** * @author James Strachan diff --git a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java index 61cd16e364..4d4b9c2e9a 100644 --- a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java +++ b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java @@ -30,7 +30,7 @@ import java.util.Properties; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; -import javax.jms.Connection; +import jakarta.jms.Connection; import junit.framework.TestCase; import org.apache.activemq.ActiveMQConnectionFactory; @@ -137,7 +137,9 @@ public class BrokerXmlConfigStartTest { System.setProperty("activemq.conf", "target/conf"); secProps = new Properties(); secProps.load(new FileInputStream(new File("target/conf/credentials.properties"))); - setEnv("ACTIVEMQ_ENCRYPTION_PASSWORD", "activemq"); + // AMQ-9239 - setEnv doesn't work w/ JDK 17 + // This is only needed for running in IDE. surefire plugin sets this during mvn builds + // setEnv("ACTIVEMQ_ENCRYPTION_PASSWORD", "activemq"); } @After