Skip to content

Commit 63a148b

Browse files
committed
MLE-24717 Bumping to ml-gradle 6.1 snapshot
Want to see these tests pass before we release ml-gradle 6.1.0. Also fixed one Sonar issue - there are 71 others that I'll handle in separate PRs.
1 parent d69f7de commit 63a148b

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
lines changed

.copyrightconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# COPYRIGHT VALIDATION CONFIG
22
# ---------------------------------
33
# Required start year (keep fixed; end year auto-updates in check output)
4-
startyear: 2023
4+
startyear: 2019
55

66
# Optional exclusions list (comma-separated). Leave commented if none.
77
# Rules:

build.gradle

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ plugins {
1717

1818
// Only used for testing
1919
id 'jacoco'
20-
id "org.sonarqube" version "5.1.0.4882"
20+
id "org.sonarqube" version "6.3.1.5724"
2121

2222
// Used to generate Avro classes. This will write classes to build/generated-test-avro-java and also add that folder
2323
// as a source root. Since this is commented out by default, the generated Avro test class has been added to
@@ -34,10 +34,11 @@ java {
3434
targetCompatibility = JavaVersion.VERSION_17
3535
}
3636

37-
38-
3937
repositories {
4038
mavenCentral()
39+
maven {
40+
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
41+
}
4142
}
4243

4344
configurations {
@@ -46,11 +47,6 @@ configurations {
4647

4748
configureEach {
4849
resolutionStrategy {
49-
// Force v4.5.0 of commons-collections4 to avoid CVEs in v4.4.0 from transitive dependecies:
50-
// CVE-2025-48924 (https://www.cve.org/CVERecord?id=CVE-2025-48924) and
51-
// CVE-2020-15250 (https://www.cve.org/CVERecord?id=CVE-2020-15250)
52-
force "org.apache.commons:commons-collections4:4.5.0"
53-
5450
// Force v3.19 of commons-lang3 to avoid CVE-2025-48924 (https://www.cve.org/CVERecord?id=CVE-2025-48924), which
5551
// is caused by the use of avro-compiler v1.12.0 with older dependencies including commons-lang3 v3.12.0.
5652
force 'org.apache.commons:commons-lang3:3.19.0'
@@ -86,7 +82,7 @@ dependencies {
8682
compileOnly kafkaConnectRuntime
8783

8884
// Force DHF to use the latest version of ml-gradle, which minimizes security vulnerabilities
89-
implementation "com.marklogic:ml-gradle:6.0.1"
85+
implementation "com.marklogic:ml-gradle:6.1-SNAPSHOT"
9086

9187
implementation "com.fasterxml.jackson.dataformat:jackson-dataformat-csv:2.19.0"
9288

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: docker-tests-marklogic-kafka-confluent
2+
name: docker-tests-marklogic-kafka
33
services:
44
marklogic:
55
image: "${MARKLOGIC_IMAGE}"

src/main/java/com/marklogic/kafka/connect/source/XmlPlanInvoker.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@
1717
import org.w3c.dom.NodeList;
1818

1919
import javax.xml.XMLConstants;
20-
import javax.xml.transform.OutputKeys;
21-
import javax.xml.transform.Transformer;
22-
import javax.xml.transform.TransformerConfigurationException;
23-
import javax.xml.transform.TransformerException;
24-
import javax.xml.transform.TransformerFactory;
20+
import javax.xml.transform.*;
2521
import javax.xml.transform.dom.DOMSource;
2622
import javax.xml.transform.stream.StreamResult;
2723
import java.io.StringWriter;
@@ -31,7 +27,7 @@
3127

3228
class XmlPlanInvoker extends AbstractPlanInvoker implements PlanInvoker {
3329

34-
private static final Logger logger = LoggerFactory.getLogger(XmlPlanInvoker.class);
30+
private static final Logger staticLogger = LoggerFactory.getLogger(XmlPlanInvoker.class);
3531

3632
private static final String TABLE_NS_URI = "http://marklogic.com/table";
3733

@@ -83,7 +79,7 @@ private String getKeyFromRow(Node row) {
8379
NamedNodeMap attributes = column.getAttributes();
8480
// The 'name' attribute is expected to exist; trust but verify
8581
if (attributes != null && attributes.getNamedItem("name") != null &&
86-
keyColumn.equals(attributes.getNamedItem("name").getTextContent())) {
82+
keyColumn.equals(attributes.getNamedItem("name").getTextContent())) {
8783
return column.getTextContent();
8884
}
8985
}
@@ -128,7 +124,7 @@ private static TransformerFactory makeNewTransformerFactory() {
128124

129125
private static void logTransformerFactoryWarning(String xmlConstant, String errorMessage) {
130126
String baseTransformerFactoryWarningMessage = "Unable to set {} on TransformerFactory; cause: {}";
131-
logger.warn(baseTransformerFactoryWarningMessage, xmlConstant, errorMessage);
127+
staticLogger.warn(baseTransformerFactoryWarningMessage, xmlConstant, errorMessage);
132128
}
133129

134130
}

test-app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,48 @@ plugins {
66
// Tasks for working with Confluent Platform running locally.
77
// See "Testing with Confluent Platform" in CONTRIBUTING.md
88

9-
task loadDatagenPurchasesConnector(type: Exec) {
9+
tasks.register("loadDatagenPurchasesConnector", Exec) {
1010
description = "Load an instance of the Datagen connector into Confluent Platform for sending JSON documents to " +
1111
"the 'purchases' topic"
1212
commandLine "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json",
1313
"--data", "@ConfluentConnectorConfigs/datagen-purchases-source.json", "http://localhost:8083/connectors"
1414
}
1515

16-
task loadMarkLogicPurchasesSinkConnector(type: Exec) {
16+
tasks.register("loadMarkLogicPurchasesSinkConnector", Exec) {
1717
description = "Load an instance of the MarkLogic Kafka connector into Confluent Platform for writing data to " +
1818
"MarkLogic from the 'purchases' topic"
1919
commandLine "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json",
2020
"--data", "@ConfluentConnectorConfigs/marklogic-purchases-sink.json", "http://localhost:8083/connectors"
2121
}
2222

23-
task loadMarkLogicPurchasesSourceConnector(type: Exec) {
23+
tasks.register("loadMarkLogicPurchasesSourceConnector", Exec) {
2424
description = "Load an instance of the MarkLogic Kafka connector into Confluent Platform for reading rows from " +
2525
"the demo/purchases view"
2626
commandLine "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json",
2727
"--data", "@ConfluentConnectorConfigs/marklogic-purchases-source.json", "http://localhost:8083/connectors"
2828
}
2929

30-
task loadMarkLogicAuthorsSourceConnector(type: Exec) {
30+
tasks.register("loadMarkLogicAuthorsSourceConnector", Exec) {
3131
description = "Loads a source connector that retrieves authors from the citations.xml file, which is also used for " +
3232
"all the automated tests"
3333
commandLine "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json",
3434
"--data", "@ConfluentConnectorConfigs/marklogic-authors-source.json", "http://localhost:8083/connectors"
3535
}
3636

37-
task loadMarkLogicEmployeesSourceConnector(type: Exec) {
37+
tasks.register("loadMarkLogicEmployeesSourceConnector", Exec) {
3838
commandLine "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json",
3939
"--data", "@ConfluentConnectorConfigs/marklogic-employees-source.json", "http://localhost:8083/connectors"
4040
}
4141

42-
task insertAuthors(type: Test) {
42+
tasks.register("insertAuthors", Test) {
4343
useJUnitPlatform()
4444
systemProperty "AUTHOR_IDS", authorIds
4545
description = "Insert a new author into the data-hub-STAGING database via a new citations XML document; " +
4646
"use e.g. -PauthorIds=7,8,9 to insert 3 new authors with IDs of 7, 8, and 9"
4747
include "com/marklogic/kafka/connect/source/debug/InsertAuthorsTest.class"
4848
}
4949

50-
task loadMarkLogicDHPurchasesSinkConnector(type: Exec) {
50+
tasks.register("loadMarkLogicDHPurchasesSinkConnector", Exec) {
5151
description = "Load an instance of the MarkLogic Kafka connector into Confluent Platform for writing data to " +
5252
"MarkLogic from the 'purchases' topic"
5353
commandLine "curl", "-s", "-X", "POST", "-H", "Content-Type: application/json",

0 commit comments

Comments
 (0)