Chapter 2. Installation

This chapter guides you through the steps required to install AMQ JMS in your environment.

2.1. Prerequisites

To begin installation, use your subscription to access AMQ distribution archives and package repositories.

To compile the examples or your own application, make sure you have Apache Maven installed.

2.2. Installing on Red Hat Enterprise Linux

  1. Download the AMQ JMS Client 1.1 zip file from the Red Hat Customer Portal.
  2. Use the unzip command to extract the file contents into a directory of your choosing.

    $ unzip apache-qpid-jms-VERSION.zip
  3. Configure Maven to discover the client.

2.3. Installing on Microsoft Windows

  1. Download the AMQ JMS Client 1.1 zip file from the Red Hat Customer Portal.
  2. Extract the file contents into a directory of your choosing by right-clicking on the zip file and selecting Extract All.
  3. 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 SystemLocation of File

Linux

/home/USERNAME/.m2/settings.xml

Windows

C:\Users\USERNAME\.m2\settings.xml

The client can be accessed by configuring Maven in one of two ways depending on your needs:

  1. Using the JBoss Enterprise Maven Repository

    The AMQ JMS Client 1.1 can be used from the JBoss Enterprise Maven Repository.

    The contents of a settings.xml configured 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>
        </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>
          </repositories>
        </profile>
      </profiles>
      <activeProfiles>
        <!-- Optionally, make the repository active by default -->
        <activeProfile>jboss-ga-repository</activeProfile>
        <activeProfile>jboss-earlyaccess-repository</activeProfile>
      </activeProfiles>
    </settings>
  2. Using a File-based Maven Repository

    Alternatively, you can download the AMQ JMS Client 1.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.xml configured 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>
        </profile>
      </profiles>
      <activeProfiles>
        <!-- Optionally, make the repository active by default -->
        <activeProfile>amq-jms-client</activeProfile>
      </activeProfiles>
    </settings>