The Client Classpath
Maven dependencies
The recommended way to define a client dependency for your java application is through a Maven dependency declaration.
There are two dependencies you can choose from, org.apache.activemq:artemis-jms-client
for JMS 2.0 or org.apache.activemq:artemis-jakarta-client
for Jakarta Messaging 3.x.
For JMS:
...
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jms-client</artifactId>
<version>2.24.0</version>
</dependency>
...
For Jakarta:
...
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-client</artifactId>
<version>2.24.0</version>
</dependency>
...
Individual client dependencies
If you dont wish to use a build tool such as Maven which manages the dependencies for you, you may also choose to add the specific dependency jars to your classpath, which are all included under ./lib on the main distribution.
For more information of the clients individual dependencies, see:
Repackaged ‘-all’ clients
Even though it is highly recommend using maven, in cases this isnt a possibility and neither is using the individual dependencies detailed above, the all-inclusive repackaged jar could be used.
These jars are available under ./lib/client
on the main distribution (or also as linked at Maven Central):
Whether you are using JMS or just the Core API simply add the artemis-jms-client-all
jar from the lib/client
directory to your client classpath. For Jakarta Messaging add the artemis-jakarta-client-all
jar instead.
Warning:These repackaged jars include all the client’s dependencies. Be careful with mixing other components jars in your application as they may clash with each other.