Java application development using a Maven repository
When developing a Java application for IBM® MQ, by using a Maven repository to automatically install dependencies, you do not need to explicitly install anything before using IBM MQ interfaces.
Maven Central Repository
Maven is a tool for building applications and also provides a repository for holding artifacts that your application may want to access.
The Maven Repository (or Central Repository) has a structure that allows files such as JAR files to have distinct versions that are then easily discovered with a well-known naming mechanism. Build tools can then use those names to dynamically pull in the dependencies for your application. In the definition of your application, which, when using Maven as a build tool, is called the POM file, you just name the dependencies and the build process knows what to do from there.
IBM MQ client files
- To show the relationship between your application code and
com.ibm.mq.allclient.jar:
<dependency> <groupId>com.ibm.mq</groupId> <artifactId>com.ibm.mq.allclient</artifactId> <version>9.1.3.0</version> </dependency>
- For using the Java EE resource
adapter:
<dependency> <groupId>com.ibm.mq</groupId> <artifactId>wmq.jmsra</artifactId> <version>9.1.3.0</version> <dependency/>
For an example of a simple project in Eclipse to run a JMS project, see the IBM Developer article Developing Java applications for MQ just got easier with Maven.