messaging
messaging copied to clipboard
Maven coordinate collision for 'jakarta.jms-api 2.x and 3.x prevents side-by-side usage
Due to an upgrade of Apache ActiveMQ we were forced to have jakarta.jms-api 3.1.0 side-by-side with 2.0.3. However, builds with Gradle end up with the 2.0.3 JAR missing. This is probably due to fact that both libraries have the same Maven coordinates despite have completely different packages (javax.jms vs. jakarta.jms, respectively).
group: 'jakarta.jms', name: 'jakarta.jms-api', version: '2.0.3'
group: 'jakarta.jms', name: 'jakarta.jms-api', version: '3.1.0'
Major versions are for API breakage. I believe the jakarta.jms-api jars are correct.
If you need a workaround, leverage a different jar for jakarta.jms-api v2.0.3, such as geronimo-jms.
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_2.0_spec</artifactId>
<version>1.0-alpha-2</version>
</dependency>