Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 2. Installation
This chapter guides you through the steps to install AMQ JMS in your environment.
2.1. Prerequisites Copier lienLien copié sur presse-papiers!
- You must have a subscription to access AMQ release files and repositories.
- To build programs with AMQ JMS, you must install Apache Maven.
- To use AMQ JMS, you must install Java.
2.2. Using the Red Hat Maven repository Copier lienLien copié sur presse-papiers!
Configure your Maven environment to download the client library from the Red Hat Maven repository.
Procedure
Add the Red Hat repository to your Maven settings or POM file. For example configuration files, see Section B.1, “Using the online repository”.
<repository> <id>red-hat-ga</id> <url>https://maven.repository.redhat.com/ga</url> </repository>
<repository> <id>red-hat-ga</id> <url>https://maven.repository.redhat.com/ga</url> </repository>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add the library dependency to your POM file.
<dependency> <groupId>org.apache.qpid</groupId> <artifactId>qpid-jms-client</artifactId> <version>1.5.0.redhat-00001</version> </dependency>
<dependency> <groupId>org.apache.qpid</groupId> <artifactId>qpid-jms-client</artifactId> <version>1.5.0.redhat-00001</version> </dependency>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The client is now available in your Maven project.
2.3. Installing a local Maven repository Copier lienLien copié sur presse-papiers!
As an alternative to the online repository, AMQ JMS can be installed to your local filesystem as a file-based Maven repository.
Procedure
- Use your subscription to download the AMQ Clients 2.11.0 JMS Maven repository .zip file.
Extract the file contents into a directory of your choosing.
On Linux or UNIX, use the
unzipcommand to extract the file contents.unzip amq-clients-2.11.0-jms-maven-repository.zip
$ unzip amq-clients-2.11.0-jms-maven-repository.zipCopy to Clipboard Copied! Toggle word wrap Toggle overflow On Windows, right-click the .zip file and select Extract All.
-
Configure Maven to use the repository in the
maven-repositorydirectory inside the extracted install directory. For more information, see Section B.2, “Using a local repository”.
2.4. Installing the examples Copier lienLien copié sur presse-papiers!
Procedure
Use the
git clonecommand to clone the source repository to a local directory namedqpid-jms:git clone https://github.com/apache/qpid-jms.git qpid-jms
$ git clone https://github.com/apache/qpid-jms.git qpid-jmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow Change to the
qpid-jmsdirectory and use thegit checkoutcommand to switch to the1.5.0branch:cd qpid-jms git checkout 1.5.0
$ cd qpid-jms $ git checkout 1.5.0Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The resulting local directory is referred to as <source-dir> throughout this document.