Skip to content

Commit 96bf282

Browse files
authored
chore: create of a new jar without MQ client (#69)
- increment version number - update dependencies in pom.xml to the latest versions - introduce a new version of the jar that includes all of the dependencies except for the MQ client jar, to allow for deployment using different MQ client jar versions Signed-off-by: neeraj-laad <neeraj.laad@uk.ibm.com>
1 parent a187590 commit 96bf282

File tree

9 files changed

+99
-30
lines changed

9 files changed

+99
-30
lines changed

.github/ISSUE_TEMPLATES/BUG_REPORT.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ body:
5757
label: Version
5858
description: What version of our software are you running?
5959
options:
60-
- 2.2.0 (Default)
60+
- 2.2.1 (Default)
6161
- 1.5.2
6262
- older (<1.5.2)
6363
validations:

.github/workflows/github-build-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ jobs:
4444
asset_path: ./target/kafka-connect-mq-sink-${{env.VERSION}}-jar-with-dependencies.jar
4545
asset_name: kafka-connect-mq-sink-${{env.VERSION}}-jar-with-dependencies.jar
4646
asset_content_type: application/java-archive
47+
- name: Upload Release Asset With non-MQ Dependencies
48+
id: upload-release-asset-with-dependencies-exc-mq
49+
uses: actions/upload-release-asset@v1
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
with:
53+
upload_url: ${{ steps.create_release.outputs.upload_url }}
54+
asset_path: ./target/kafka-connect-mq-sink-${{env.VERSION}}-dependencies-exc-mq.jar
55+
asset_name: kafka-connect-mq-sink-${{env.VERSION}}-dependencies-exc-mq.jar
56+
asset_content_type: application/java-archive
4757
- name: Upload Release Asset
4858
id: upload-release-asset
4959
uses: actions/upload-release-asset@v1

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,12 +460,12 @@ When attempting to send a message to an IBM MQ queue, an MQException with code `
460460
#### Additional tips
461461

462462
- Verify that the length of all properties are correctly set within the allowed limit.
463-
- Do not set the [`JMS_IBM_MQMD_BackoutCount`](https://www.ibm.com/docs/en/ibm-mq/9.3?topic=descriptor-backoutcount-mqlong-mqmd) property.
463+
- Do not set the [`JMS_IBM_MQMD_BackoutCount`](https://www.ibm.com/docs/en/ibm-mq/9.4?topic=descriptor-backoutcount-mqlong-mqmd) property.
464464
- Refer to the IBM MQ documentation for detailed configuration guidance:
465465

466-
- [IBM MQ JMS Message Object Properties](https://www.ibm.com/docs/en/ibm-mq/9.3?topic=application-jms-message-object-properties): This documentation provides details about various properties that can be set on IBM MQ JMS message objects, including their names, types, and descriptions.
466+
- [IBM MQ JMS Message Object Properties](https://www.ibm.com/docs/en/ibm-mq/9.4?topic=application-jms-message-object-properties): This documentation provides details about various properties that can be set on IBM MQ JMS message objects, including their names, types, and descriptions.
467467
- [IBM MQ Developer Community](https://community.ibm.com/community/user/integration/home): The developer community for IBM MQ, where you can find forums, articles, and resources related to development and troubleshooting for IBM MQ.
468-
- [IBM MQ troubleshooting guide](https://www.ibm.com/docs/en/ibm-mq/9.3?topic=mq-troubleshooting-support): IBM guide for troubleshooting common issues and errors in IBM MQ.
468+
- [IBM MQ troubleshooting guide](https://www.ibm.com/docs/en/ibm-mq/9.4?topic=mq-troubleshooting-support): IBM guide for troubleshooting common issues and errors in IBM MQ.
469469

470470
## Support
471471

pom.xml

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<groupId>com.ibm.eventstreams.connect</groupId>
2121
<artifactId>kafka-connect-mq-sink</artifactId>
2222
<packaging>jar</packaging>
23-
<version>2.2.0</version>
23+
<version>2.2.1</version>
2424
<name>kafka-connect-mq-sink</name>
2525
<organization>
2626
<name>IBM Corporation</name>
@@ -45,13 +45,13 @@
4545
<dependency>
4646
<groupId>org.apache.kafka</groupId>
4747
<artifactId>connect-api</artifactId>
48-
<version>3.4.1</version>
48+
<version>3.7.1</version>
4949
<scope>provided</scope>
5050
</dependency>
5151
<dependency>
5252
<groupId>org.apache.kafka</groupId>
5353
<artifactId>connect-json</artifactId>
54-
<version>3.4.1</version>
54+
<version>3.7.1</version>
5555
<scope>provided</scope>
5656
</dependency>
5757

@@ -63,7 +63,7 @@
6363
<dependency>
6464
<groupId>com.ibm.mq</groupId>
6565
<artifactId>com.ibm.mq.allclient</artifactId>
66-
<version>9.3.3.1</version>
66+
<version>9.4.0.5</version>
6767
</dependency>
6868

6969
<dependency>
@@ -75,12 +75,12 @@
7575
<dependency>
7676
<groupId>org.slf4j</groupId>
7777
<artifactId>slf4j-api</artifactId>
78-
<version>2.0.7</version>
78+
<version>2.0.16</version>
7979
</dependency>
8080
<dependency>
8181
<groupId>org.slf4j</groupId>
8282
<artifactId>slf4j-simple</artifactId>
83-
<version>2.0.7</version>
83+
<version>2.0.16</version>
8484
<scope>test</scope>
8585
</dependency>
8686

@@ -89,7 +89,7 @@
8989
<dependency>
9090
<groupId>org.testcontainers</groupId>
9191
<artifactId>testcontainers</artifactId>
92-
<version>1.17.2</version>
92+
<version>1.20.2</version>
9393
<scope>test</scope>
9494
</dependency>
9595

@@ -103,14 +103,14 @@
103103
<dependency>
104104
<groupId>org.assertj</groupId>
105105
<artifactId>assertj-core</artifactId>
106-
<version>3.24.2</version>
106+
<version>3.26.3</version>
107107
<scope>test</scope>
108108
</dependency>
109109

110110
<dependency>
111111
<groupId>com.fasterxml.jackson.core</groupId>
112112
<artifactId>jackson-databind</artifactId>
113-
<version>2.14.3</version>
113+
<version>2.18.0</version>
114114
</dependency>
115115

116116
</dependencies>
@@ -134,7 +134,7 @@
134134
</plugin>
135135
<plugin>
136136
<artifactId>maven-compiler-plugin</artifactId>
137-
<version>3.1</version>
137+
<version>3.13.0</version>
138138
<configuration>
139139
<source>1.8</source>
140140
<target>1.8</target>
@@ -144,7 +144,7 @@
144144
<!-- run unit tests -->
145145
<plugin>
146146
<artifactId>maven-surefire-plugin</artifactId>
147-
<version>3.0.0-M7</version>
147+
<version>3.4.0</version>
148148
<configuration>
149149
<argLine>${surefire.jacoco.args}</argLine>
150150
<systemPropertyVariables>
@@ -156,7 +156,7 @@
156156
<!-- run integration tests -->
157157
<plugin>
158158
<artifactId>maven-failsafe-plugin</artifactId>
159-
<version>3.0.0-M7</version>
159+
<version>3.5.0</version>
160160
<configuration>
161161
<argLine>${failsafe.jacoco.args}</argLine>
162162
<systemPropertyVariables>
@@ -179,18 +179,33 @@
179179
<artifactId>maven-assembly-plugin</artifactId>
180180
<version>3.1.1</version>
181181
<executions>
182+
<!-- an uber jar including all runtime dependencies -->
182183
<execution>
184+
<id>dependencies-all</id>
183185
<phase>package</phase>
184186
<goals>
185187
<goal>single</goal>
186188
</goals>
189+
<configuration>
190+
<descriptors>
191+
<descriptor>src/assembly/package.xml</descriptor>
192+
</descriptors>
193+
</configuration>
194+
</execution>
195+
<!-- an uber jar including runtime dependencies other than the MQ client -->
196+
<execution>
197+
<id>dependencies-exc-mq</id>
198+
<phase>package</phase>
199+
<goals>
200+
<goal>single</goal>
201+
</goals>
202+
<configuration>
203+
<descriptors>
204+
<descriptor>src/assembly/package-excludemq.xml</descriptor>
205+
</descriptors>
206+
</configuration>
187207
</execution>
188208
</executions>
189-
<configuration>
190-
<descriptors>
191-
<descriptor>src/assembly/package.xml</descriptor>
192-
</descriptors>
193-
</configuration>
194209
</plugin>
195210

196211
<!-- add the src/integration folder as a test folder, which lets us keep -->
@@ -199,7 +214,7 @@
199214
<plugin>
200215
<groupId>org.codehaus.mojo</groupId>
201216
<artifactId>build-helper-maven-plugin</artifactId>
202-
<version>3.3.0</version>
217+
<version>3.6.0</version>
203218
<executions>
204219
<execution>
205220
<id>add-test-source</id>
@@ -220,7 +235,7 @@
220235
<plugin>
221236
<groupId>org.jacoco</groupId>
222237
<artifactId>jacoco-maven-plugin</artifactId>
223-
<version>0.8.8</version>
238+
<version>0.8.12</version>
224239
<executions>
225240
<execution>
226241
<id>before-unit-test-execution</id>
@@ -299,7 +314,7 @@
299314
<plugin>
300315
<groupId>org.apache.maven.plugins</groupId>
301316
<artifactId>maven-checkstyle-plugin</artifactId>
302-
<version>3.2.0</version>
317+
<version>3.5.0</version>
303318
<configuration>
304319
<encoding>UTF-8</encoding>
305320
<consoleOutput>true</consoleOutput>
@@ -324,7 +339,7 @@
324339
<plugin>
325340
<groupId>org.apache.maven.plugins</groupId>
326341
<artifactId>maven-surefire-plugin</artifactId>
327-
<version>3.1.0</version>
342+
<version>3.4.0</version>
328343
<configuration>
329344
<reuseForks>false</reuseForks>
330345
<forkCount>1</forkCount>

src/assembly/package-excludemq.xml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
* Copyright 2018, 2023, 2024 IBM Corporation
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
-->
17+
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"
18+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0
20+
http://maven.apache.org/xsd/assembly-2.0.0.xsd">
21+
<id>dependencies-exc-mq</id>
22+
<formats>
23+
<format>jar</format>
24+
</formats>
25+
<includeBaseDirectory>false</includeBaseDirectory>
26+
<dependencySets>
27+
<dependencySet>
28+
<outputDirectory></outputDirectory>
29+
<unpack>true</unpack>
30+
<unpackOptions>
31+
<excludes>
32+
<exclude>**/copyright-exclude</exclude>
33+
<exclude>META-INF/maven/**</exclude>
34+
<exclude>META-INF/LICENSE*</exclude>
35+
</excludes>
36+
</unpackOptions>
37+
<excludes>
38+
<exclude>com.ibm.mq:com.ibm.mq.allclient</exclude>
39+
</excludes>
40+
<useTransitiveFiltering>true</useTransitiveFiltering>
41+
<scope>runtime</scope>
42+
</dependencySet>
43+
</dependencySets>
44+
</assembly>

src/integration/java/com/ibm/eventstreams/connect/mqsink/AbstractJMSContextIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public abstract class AbstractJMSContextIT {
9191
public static final String CONNECTION_MODE = "client";
9292
public static final String HOST_NAME = "localhost";
9393

94-
public static final String MQ_IMAGE = "icr.io/ibm-messaging/mq:9.3.2.1-r2";
94+
public static final String MQ_IMAGE = "icr.io/ibm-messaging/mq:9.4.0.5-r2";
9595
public static final boolean USER_AUTHENTICATION_MQCSP = false;
9696

9797
protected final ObjectMapper mapper = new ObjectMapper();

src/integration/java/com/ibm/eventstreams/connect/mqsink/util/MessageDescriptorBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public Message getJMSMessage(JMSContext jmsCtxt, SinkRecord record) {
3636
// JMS_IBM_MQMD_MsgId - byte[]
3737
// JMS_IBM_MQMD_ApplIdentityData - string
3838
// JMS_IBM_MQMD_PutApplName - string
39-
// https://www.ibm.com/docs/en/ibm-mq/9.3?topic=application-jms-message-object-properties
39+
// https://www.ibm.com/docs/en/ibm-mq/9.4?topic=application-jms-message-object-properties
4040
try {
4141
message.setObjectProperty(JmsConstants.JMS_IBM_MQMD_MSGID, "ThisIsMyId".getBytes());
4242
message.setStringProperty(JmsConstants.JMS_IBM_MQMD_APPLIDENTITYDATA, "ThisIsMyApplicationData");

src/main/java/com/ibm/eventstreams/connect/mqsink/MQSinkConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ public class MQSinkConfig {
157157
public static final String CONFIG_DOCUMENTATION_MQ_RETRY_BACKOFF_MS = "Time to wait, in milliseconds, before retrying after retriable exceptions";
158158
public static final String CONFIG_DISPLAY_MQ_RETRY_BACKOFF_MS = "Retry backoff (ms)";
159159

160-
// https://www.ibm.com/docs/en/ibm-mq/9.3?topic=amffmcja-reading-writing-message-descriptor-from-mq-classes-jms-application
160+
// https://www.ibm.com/docs/en/ibm-mq/9.4?topic=amffmcja-reading-writing-message-descriptor-from-mq-classes-jms-application
161161
public static final String CONFIG_NAME_MQ_MQMD_WRITE_ENABLED = "mq.message.mqmd.write";
162162
public static final String CONFIG_DISPLAY_MQ_MQMD_WRITE_ENABLED = "Enable a custom message builder to write MQ message descriptors";
163163
public static final String CONFIG_DOCUMENTATION_MQ_MQMD_WRITE_ENABLED = "This configuration option determines whether the MQMD structure will be written along with the message data. Enabling this option allows control information to accompany the application data during message transmission between sending and receiving applications. Disabling this option will exclude the MQMD structure from the message payload.";
164164

165-
// https://www.ibm.com/docs/en/ibm-mq/9.3?topic=application-jms-message-object-properties
165+
// https://www.ibm.com/docs/en/ibm-mq/9.4?topic=application-jms-message-object-properties
166166
public static final String CONFIG_NAME_MQ_MQMD_MESSAGE_CONTEXT = "mq.message.mqmd.context";
167167
public static final String CONFIG_DISPLAY_MQ_MQMD_MESSAGE_CONTEXT = "Message context to set on the destination queue. This is required when setting some message descriptors.";
168168
public static final String CONFIG_DOCUMENTATION_MQ_MQMD_MESSAGE_CONTEXT = "This configuration option specifies the context in which MQMD properties are applied. Certain properties require this context to be set appropriately for them to take effect. Valid options for WMQ_MQMD_MESSAGE_CONTEXT are IDENTITY for WMQ_MDCTX_SET_IDENTITY_CONTEXT or ALL for WMQ_MDCTX_SET_ALL_CONTEXT.";

src/main/java/com/ibm/eventstreams/connect/mqsink/MQSinkConnector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public class MQSinkConnector extends SinkConnector {
3434
private static final Logger log = LoggerFactory.getLogger(MQSinkConnector.class);
3535

36-
public static String version = "2.2.0";
36+
public static String version = "2.2.1";
3737

3838
private Map<String, String> configProps;
3939

0 commit comments

Comments
 (0)