Chapter 2. Installation
This chapter guides you through the steps to install AMQ JMS in your environment.
2.1. Prerequisites
To begin installation, use your subscription to access AMQ distribution files and repositories.
To compile the examples or your own application, make sure you have Apache Maven installed.
2.2. Installing on Red Hat Enterprise Linux
- Open a browser and log in to the Red Hat Customer Portal Product Downloads page at access.redhat.com/downloads.
- Locate the Red Hat AMQ Clients entry in the JBOSS INTEGRATION AND AUTOMATION category.
- Click Red Hat AMQ Clients. The Software Downloads page opens.
- Download the AMQ JMS Client zip file.
Use the
unzipcommand to extract the file contents into a directory of your choosing.$ unzip apache-qpid-jms-<version>.zip
- Configure Maven to discover the client.
2.3. Installing on Microsoft Windows
- Open a browser and log in to the Red Hat Customer Portal Product Downloads page at access.redhat.com/downloads.
- Locate the Red Hat AMQ Clients entry in the JBOSS INTEGRATION AND AUTOMATION category.
- Click Red Hat AMQ Clients. The Software Downloads page opens.
- Download the AMQ JMS Client zip file.
- Extract the file contents into a directory of your choosing by right-clicking on the zip file and selecting Extract All.
- Configure Maven to discover the client.
2.4. Configuring Maven
The client uses Apache Maven as its build tool.
To build and run the client examples, or to use the client in dependent Maven application builds, you must first configure Maven to discover a repository for the client. To do so, you must update or create the Maven settings.xml file. It is typically located at one of the following locations.
Table 2.1. File location
| Operating System | Location of File |
|---|---|
| Linux |
|
| Windows |
|
The client can be accessed by configuring Maven in one of two ways depending on your needs:
Using the JBoss Enterprise Maven Repository
The AMQ JMS Client 2.1 can be used from the JBoss Enterprise Maven Repository.
The contents of a
settings.xmlconfigured to use the repository would resemble the following example.<settings> <profiles> <!-- Configure the JBoss GA Maven repository --> <profile> <id>jboss-ga-repository</id> <repositories> <repository> <id>jboss-ga-repository</id> <url>https://maven.repository.redhat.com/ga</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-ga-repository</id> <url>http://maven.repository.redhat.com/ga</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> <!-- Configure the JBoss Early Access Maven repository --> <profile> <id>jboss-earlyaccess-repository</id> <repositories> <repository> <id>jboss-earlyaccess-repository</id> <url>https://maven.repository.redhat.com/earlyaccess/all/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <pluginRepositories> <pluginRepository> <id>jboss-earlyaccess-repository</id> <url>http://maven.repository.redhat.com/earlyaccess/all/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </repositories> </profile> </profiles> <activeProfiles> <!-- Optionally, make the repository active by default --> <activeProfile>jboss-ga-repository</activeProfile> <activeProfile>jboss-earlyaccess-repository</activeProfile> </activeProfiles> </settings>Using a File-based Maven Repository
Alternatively, you can download the AMQ JMS Client 2.1 Maven Repository zip file from the Red Hat Customer Portal, extract it, and configure Maven to utilize this locally instead.
The contents of a
settings.xmlconfigured to use the file-based repository should resemble the following example. Remember to update the URL to the actual path of the extracted repository.<settings> <profiles> <!-- Configure the File Based Maven repository --> <profile> <id>amq-jms-client</id> <repositories> <repository> <id>amq-qpid-jms</id> <url>file:///path/to/extracted/maven-repository</url> <!-- If using Windows, an example URL might be: file://C:\path\to\installation\maven-repository --> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>jboss-amq-repository</id> <url>file:///path/to/extracted/maven-repository</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <!-- Optionally, make the repository active by default --> <activeProfile>amq-jms-client</activeProfile> </activeProfiles> </settings>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.