[AMQ-9239] jakarta.jms - assembly changes

This commit is contained in:
Matt Pavlovich 2023-04-13 09:27:31 -05:00
parent 90fbd9098b
commit e10d457868
40 changed files with 159 additions and 103 deletions

View File

@ -56,8 +56,8 @@
<artifactId>activemq-jdbc-store</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-annotation_1.3_spec</artifactId>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>

View File

@ -232,24 +232,24 @@
<artifactId>jakarta.jms-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
<groupId>jakarta.resource</groupId>
<artifactId>jakarta.resource-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jacc_1.1_spec</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-websocket-api</artifactId>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jta_1.1_spec</artifactId>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
@ -268,6 +268,10 @@
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
@ -342,8 +346,8 @@
<artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-annotation_1.3_spec</artifactId>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
@ -357,6 +361,17 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jstl</artifactId>
<version>11.0.0</version>
</dependency>
<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jakarta.servlet.jsp.jstl</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
@ -389,11 +404,13 @@
<artifactId>xmlParserAPIs</artifactId>
<version>2.6.2</version>
</dependency>
<!--
<dependency>
<groupId>org.jolokia</groupId>
<artifactId>jolokia-core</artifactId>
<version>${jolokia-version}</version>
</dependency>
-->
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>

View File

@ -142,7 +142,7 @@
<include>${pom.groupId}:activemq-jaas</include>
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
<include>jakarta.jms:jakarta.jms-api</include>
<include>org.apache.geronimo.specs:geronimo-jta_1.1_spec</include>
<include>jakarta.transaction:jakarta.transaction-api</include>
<include>${pom.groupId}:activemq-web</include>
<include>org.fusesource.hawtbuf:hawtbuf</include>
<include>javax.xml.bind:jaxb-api</include>
@ -157,6 +157,7 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</dependencySet>
<!-- AMQ-9239 as of 2023-06-05 Camel does not support jakarta.jms*
<dependencySet>
<outputDirectory>lib/camel</outputDirectory>
<unpack>false</unpack>
@ -169,6 +170,7 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</dependencySet>
-->
<dependencySet>
<outputDirectory>lib/optional</outputDirectory>
<unpack>false</unpack>
@ -193,7 +195,7 @@
<include>org.apache.logging.log4j:log4j-slf4j2-impl</include>
<include>org.apache.logging.log4j:log4j-api</include>
<include>org.apache.logging.log4j:log4j-core</include>
<include>org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec</include>
<include>jakarta.resource:jakarta.resource-api</include>
<include>org.apache.httpcomponents:httpclient</include>
<include>org.apache.httpcomponents:httpcore</include>
<include>org.apache.xbean:xbean-spring</include>
@ -253,18 +255,21 @@
<include>org.eclipse.jetty:jetty-util</include>
<include>org.eclipse.jetty:jetty-http</include>
<include>org.eclipse.jetty:jetty-io</include>
<include>org.eclipse.jetty:jetty-jndi</include>
<include>org.eclipse.jetty:jetty-plus</include>
<include>org.eclipse.jetty:jetty-servlet</include>
<include>org.eclipse.jetty:jetty-security</include>
<include>org.eclipse.jetty:jetty-rewrite</include>
<include>org.eclipse.jetty:jetty-continuation</include>
<include>org.eclipse.jetty.websocket:websocket-api</include>
<include>org.eclipse.jetty.websocket:websocket-common</include>
<include>org.eclipse.jetty.websocket:websocket-server</include>
<include>org.eclipse.jetty.toolchain:jetty-jakarta-servlet-api</include>
<include>org.eclipse.jetty.websocket:websocket-core-common</include>
<include>org.eclipse.jetty.websocket:websocket-core-server</include>
<include>org.eclipse.jetty.websocket:websocket-jetty-api</include>
<include>org.eclipse.jetty.websocket:websocket-jetty-common</include>
<include>org.eclipse.jetty.websocket:websocket-jetty-server</include>
<include>org.eclipse.jetty.websocket:websocket-servlet</include>
<include>org.eclipse.jetty.orbit:javax.security.auth.message</include>
<include>org.apache.tomcat:tomcat-servlet-api</include>
<include>org.apache.tomcat:tomcat-websocket-api</include>
<!-- include>jakarta.servlet:jakarta.servlet-api</include -->
<include>jakarta.websocket:jakarta.websocket-api</include>
<!-- JSP support -->
<!-- Jetty JSP api-->
@ -273,12 +278,14 @@
<include>org.mortbay.jasper:apache-jsp</include>
<!-- jstl and el api -->
<include>org.eclipse.jetty:apache-jstl</include>
<include>org.apache.taglibs:taglibs-standard-spec</include>
<include>jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api</include>
<include>org.glassfish.web:jakarta.servlet.jsp.jstl</include>
<!-- include>org.apache.taglibs:taglibs-standard-spec</include -->
<!-- jstl and el impl -->
<include>org.mortbay.jasper:apache-el</include>
<include>org.apache.taglibs:taglibs-standard-impl</include>
<!-- include>org.apache.taglibs:taglibs-standard-impl</include -->
<include>org.apache.geronimo.specs:geronimo-annotation_1.3_spec</include>
<include>jakarta.annotation:jakarta.annotation-api</include>
<include>org.ow2.asm:asm</include>
<include>org.eclipse.jdt:ecj</include>
@ -288,7 +295,7 @@
<include>org.jdom:jdom2</include>
<!-- REST API -->
<include>org.jolokia:jolokia-core</include>
<!-- include>org.jolokia:jolokia-core</include -->
<include>com.googlecode.json-simple:json-simple</include>
</includes>
<fileMode>0644</fileMode>

View File

@ -43,7 +43,10 @@
</bean>
<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="securityConstraint" />
<!-- AMQ-9239 TODO: review jetty.xml pathSpec change
<property name="pathSpec" value="/,/api/*,*.jsp,*.html,*.js,*.css,*.png,*.gif,*.ico" />
-->
<property name="pathSpec" value="/,/api/*" />
</bean>
<bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="adminSecurityConstraint" />

View File

@ -31,7 +31,7 @@
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>2.0.3</version>
<version>${jakarta-jms-api-version}</version>
</dependency>
<dependency>
<groupId>org.apache.qpid</groupId>
@ -46,10 +46,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${source-version}</source>
<target>${target-version}</target>
</configuration>
</plugin>

View File

@ -17,7 +17,7 @@
package example;
import org.apache.qpid.jms.*;
import javax.jms.*;
import jakarta.jms.*;
class Listener {

View File

@ -17,7 +17,7 @@
package example;
import org.apache.qpid.jms.*;
import javax.jms.*;
import jakarta.jms.*;
class Publisher {

View File

@ -208,8 +208,8 @@
For more details see
http://activemq.apache.org/enterprise-integration-patterns.html
-->
<import resource="camel.xml"/>
-->
<!--

View File

@ -39,7 +39,7 @@
</bean>
<bean id="securityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="securityConstraint" />
<property name="pathSpec" value="/admin/*,*.jsp" />
<property name="pathSpec" value="/admin,/api/*" />
</bean>
<bean id="adminSecurityConstraintMapping" class="org.eclipse.jetty.security.ConstraintMapping">
<property name="constraint" ref="adminSecurityConstraint" />
@ -179,3 +179,4 @@
</beans>

View File

@ -42,10 +42,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${source-version}</source>
<target>${target-version}</target>
</configuration>
</plugin>

View File

@ -18,7 +18,7 @@ package example.composite.dest;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.composite.dest;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.topic.durable;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.topic.durable;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
import java.util.concurrent.CountDownLatch;
/**

View File

@ -18,7 +18,7 @@ package example.queue.exclusive;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.queue.exclusive;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.browser;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
import java.util.Enumeration;
import java.util.concurrent.TimeUnit;

View File

@ -18,7 +18,7 @@ package example.browser;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.queue.selector;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.queue.selector;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.queue;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.queue;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -17,7 +17,7 @@ package example.tempdest; /**
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -17,7 +17,7 @@ package example.tempdest; /**
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
import java.util.concurrent.TimeUnit;
/**

View File

@ -18,7 +18,7 @@ package example.topic;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
/**
* @author <a href="http://www.christianposta.com/blog">Christian Posta</a>

View File

@ -18,7 +18,7 @@ package example.topic;
import org.apache.activemq.ActiveMQConnectionFactory;
import javax.jms.*;
import jakarta.jms.*;
import java.util.concurrent.CountDownLatch;
/**

View File

@ -19,7 +19,7 @@ package example.transaction;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQTopic;
import javax.jms.*;
import jakarta.jms.*;
import java.util.Scanner;
/**

View File

@ -19,7 +19,7 @@ package example.wildcard;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQTopic;
import javax.jms.*;
import jakarta.jms.*;
import java.util.Scanner;
/**

View File

@ -44,7 +44,7 @@
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>2.0.3</version>
<version>${jakarta-jms-api-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
@ -59,14 +59,23 @@
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin-version}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${source-version}</source>
<target>${target-version}</target>
</configuration>
</plugin>
</plugins>

View File

@ -30,7 +30,7 @@
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>2.0.3</version>
<version>${jakarta-jms-api-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
@ -49,10 +49,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${source-version}</source>
<target>${target-version}</target>
</configuration>
</plugin>

View File

@ -19,7 +19,7 @@ package example;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQTopic;
import javax.jms.*;
import jakarta.jms.*;
class Listener {

View File

@ -19,7 +19,7 @@ package example;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.command.ActiveMQTopic;
import javax.jms.*;
import jakarta.jms.*;
class Publisher {

View File

@ -31,7 +31,7 @@
<dependency>
<groupId>jakarta.jms</groupId>
<artifactId>jakarta.jms-api</artifactId>
<version>2.0.3</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>io.hyte.stompjms</groupId>
@ -48,8 +48,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>

View File

@ -16,8 +16,12 @@
*/
package example;
<<<<<<< HEAD
import org.fusesource.stomp.jms.*;
import javax.jms.*;
=======
import io.hyte.stomp.jms.*;
>>>>>>> b76b26305 ([AMQ-9239] jakarta.jms - assembly changes)
import jakarta.jms.*;
class Listener {

View File

@ -16,8 +16,12 @@
*/
package example;
<<<<<<< HEAD
import org.fusesource.stomp.jms.*;
import javax.jms.*;
=======
import io.hyte.stomp.jms.*;
>>>>>>> b76b26305 ([AMQ-9239] jakarta.jms - assembly changes)
import jakarta.jms.*;
class Publisher {

View File

@ -15,10 +15,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee
web-app_5_0.xsd"
version="5.0">
<display-name>Apache ActiveMQ REST API</display-name>
@ -36,9 +37,11 @@
-->
</servlet>
<!-- AMQ-9239 jakarta - jolokia does not support jakarta
<servlet>
<servlet-name>jolokia-agent</servlet-name>
<servlet-class>org.jolokia.http.AgentServlet</servlet-class>
-->
<!-- Uncomment this if you want jolokia multicast discovery to be enabled
<init-param>
<param-name>discoveryEnabled</param-name>
@ -53,27 +56,33 @@
<param-value>Apache ActiveMQ</param-value>
</init-param>
-->
<!-- AMQ-9239 jakarta - jolokia does not support jakarta
<init-param>
<param-name>policyLocation</param-name>
<param-value>${prop:jolokia.conf}</param-value>
</init-param>
-->
<!-- turn off returning exceptions and stacktraces from jolokia -->
<!-- AMQ-9239 jakarta - jolokia does not support jakarta
<init-param>
<param-name>allowErrorDetails</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
-->
<servlet-mapping>
<servlet-name>MessageServlet</servlet-name>
<url-pattern>/message/*</url-pattern>
</servlet-mapping>
<!-- AMQ-9239 jakarta - jolokia does not support jakarta
<servlet-mapping>
<servlet-name>jolokia-agent</servlet-name>
<url-pattern>/jolokia/*</url-pattern>
</servlet-mapping>
-->
<session-config>
<cookie-config>

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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