2

We are using IBM MQ 8.0.0.4 in our application and so we are planning on hosting the jars in our maven repository manager (Nexus OSS 2 in this case).

What is the convention for the GAV for IBM MQ specifically?

The jars that are required are:

commonservices.jar
dhbcore.jar
headers.jar
jmqi.jar
mqjms.jar
pcf.jar
mq.jar
Nojndi.jar
jndi.jar
fscontext.jar
providerutil.jar
jms.jar
connector.jar

All of them up to mq.jar are IBM jars.

Should I use the com.ibm group id?

Or the com.ibm.mq group id?

Or a mix - for instance the manifest for dhbcore.jar says com.ibm.disthub2

What is the convention for the version number? Should I use 8.0.0.4 for all the ibm jars or should I take the version from the manifest?

The version in the manifest is 8.0.0.4 in most of them but commonervices.jar and mqjms.jar say p800-004-151017. This still looks like 8.0.0.4 to me but looks like some non-maven snapshot convention.

What are the conventions in this case? (I'm not looking for the general maven conventions but how they apply specifically to this use case).

opticyclic
  • 7,412
  • 12
  • 81
  • 155
  • I don't see any current IBM MQ jars in maven. They are distributed with the installation and you have to use them locally. I found this post helpful https://stackoverflow.com/questions/4955635/how-to-add-local-jar-files-in-maven-project – K.Nicholas Jul 23 '17 at 14:27
  • If you read that post you will see I have the highest rated comment pointing out that the accepted answer is wrong :) This question is not about how to use the jars locally but what GAV parameters are conventionally used with IBM jars when you host them in your own repo. – opticyclic Jul 23 '17 at 16:44
  • Thanks for the correction. Since you are manually putting jars in your own repository I don't suppose it matters, though I would use the packages as guidelines, which is what I did. com.ibm and mq. – K.Nicholas Jul 23 '17 at 17:20
  • At 8.0.0.4 and higher (v9.0.0.0 and higher) you can download a Java only client which includes a fewer number of jar files. Most of the previously separate jars are included in the `com.ibm.mq.allclient.jar` this along with the `com.ibm.mq.traceControl.jar` are all you need for IBM MQ Classes for Java applications, for IBM MQ Classes for JMS you also need the other four jars. Link: "[IBM MQ JMS and Java 'All Client'](http://www.ibm.com/support/fixcentral/swg/quickorder?product=ibm/WebSphere/WebSphere+MQ&release=All&platform=All&function=fixId&fixids=8.0.0.5-WS-MQ-Install-Java-All)" – JoshMc Jul 24 '17 at 05:16
  • That almost sounds like an answer...... – opticyclic Jul 24 '17 at 23:08
  • I don't really know the answer to your specific question about conventions in maven, but I did want to pass on that you no longer need to deal with 13 jar files and now it is down to either 2 or 5 depending on if you are using Classes for Java or Classes for JMS. I'll put the information in a answer to make it more readable and address the version portion of your question as well. – JoshMc Jul 26 '17 at 22:11
  • Update: According to IBM developerWorks blog post "[Developing Java applications for MQ just got easier with Maven](https://developer.ibm.com/messaging/2018/01/09/developing-mq-java-applications-maven/)" by Mark E Taylor from the IBM MQ Development team, IBM is now pushing copies of the MQ Java client interfaces to the Maven Central Repository under the com.ibm.mq GroupId starting with MQ v9.0.4 Continuous Delivery. – JoshMc Jan 22 '18 at 06:30

1 Answers1

2

UPDATE:

As of v9.0.4.0 IBM have pushed copies of the MQ Java client interfaces to the Central Repository under the com.ibm.mq GroupId. e.g.

<dependency>
    <groupId>com.ibm.mq</groupId>
    <artifactId>com.ibm.mq.allclient</artifactId>
    <version>9.0.4.0</version>
</dependency>

ORIGINAL:

At IBM MQ v8.0.0.3 and higher you can download a Java only client which includes a fewer number of jar files. This is packaged as a self extracting jar file. The latest v8 package can be downloaded on Fix Central using this link: IBM MQ JMS and Java 'All Client'

Most of the previously separate jars are now included in the com.ibm.mq.allclient.jar.


For IBM MQ Classes for Java you can find the list of files required on the Knowledge Center page "What is installed for IBM MQ classes for Java":

Relocatable JAR files
Within an enterprise, the following files can be moved to systems that need to run IBM MQ classes for Java applications:

  • com.ibm.mq.allclient.jar
  • com.ibm.mq.traceControl.jar

For IBM MQ Classes for JMS you can find the list of files required on the Knowledge Center page "What is installed for IBM MQ classes for JMS":

Relocatable JAR files
Within an enterprise, the following files can be moved to systems that need to run IBM MQ classes for JMS:

  • com.ibm.mq.allclient.jar
  • com.ibm.mq.traceControl.jar
  • jms.jar
  • fscontext.jar
  • providerutil.jar

For version numbers I suggest you use the version number of the package they came from, in your example 8.0.0.4.

opticyclic
  • 7,412
  • 12
  • 81
  • 155
JoshMc
  • 10,239
  • 2
  • 19
  • 38