Skip to content

Commit 2fc2aa5

Browse files
committed
Multiple upgrades to prep for Kafka 4
Update Gradle to 8.14.3 Upgrade Data Hub to 6.2.1 Upgrade to MarkLogic 12 Require Java 17
1 parent b922ba4 commit 2fc2aa5

File tree

11 files changed

+133
-114
lines changed

11 files changed

+133
-114
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ distribution.
44

55
### Requirements:
66
* MarkLogic Server 11+
7-
* Java, either version 11 or 17, is required to use the Gradle tools.
7+
* Java version 17 is required to use the Gradle tools.
88
Additionally, SonarQube requires the use of Java 17.
99

1010
See [the Confluent compatibility matrix](https://docs.confluent.io/platform/current/installation/versions-interoperability.html#java)
@@ -73,10 +73,14 @@ application must be deployed. From the "test-app" directory, follow these steps:
7373
2. Edit gradle-local.properties and set `mlUsername` and `mlPassword`
7474
3. Run `./gradlew -i mlDeploy`
7575

76+
Note: If you change the version of Data Hub Framework used by this project, you should also delete the following directories:
77+
* 'test-app/src/main/entity-config'
78+
* 'test-app/src/main/hub-internal-config'
79+
7680

7781
## Automated Testing
7882
Now that your MarkLogic server is configured and the test-app is deployed, you can run the tests via from the root
79-
directory. Note that you must be using Java 11 or Java 17 for this command due to the latest version of Gradle.
83+
directory. Note that you must be using Java 17 for this command due to the latest version of Gradle.
8084
```
8185
./gradlew test
8286
```

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pipeline{
66
buildDiscarder logRotator(artifactDaysToKeepStr: '7', artifactNumToKeepStr: '', daysToKeepStr: '30', numToKeepStr: '')
77
}
88
environment{
9-
JAVA_HOME_DIR="/home/builder/java/jdk-11.0.2"
9+
JAVA_HOME_DIR="/home/builder/java/jdk-17.0.2"
1010
GRADLE_DIR =".gradle"
1111
DMC_USER = credentials('MLBUILD_USER')
1212
DMC_PASSWORD = credentials('MLBUILD_PASSWORD')

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ dependencies {
5858

5959
// Note that in general, the version of the DHF jar must match that of the deployed DHF instance. Different versions
6060
// may work together, but that behavior is not guaranteed.
61-
implementation("com.marklogic:marklogic-data-hub:6.1.1") {
61+
implementation("com.marklogic:marklogic-data-hub:6.2.1") {
6262
exclude module: "marklogic-client-api"
6363
exclude module: "ml-javaclient-util"
6464
exclude module: "ml-app-deployer"

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

test-app/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MARKLOGIC_IMAGE=ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com/marklogic/marklogic-server-ubi:latest-12

test-app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
plugins {
22
id 'net.saliman.properties' version '1.5.2'
3-
id "com.marklogic.ml-data-hub" version "6.0.0"
3+
id "com.marklogic.ml-data-hub" version "6.2.1"
44
}
55

66
// Tasks for working with Confluent Platform running locally.

test-app/docker-compose.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
version: '3.8'
32
name: marklogic-kafka-confluent
43
services:
54

@@ -194,7 +193,7 @@ services:
194193
KAFKA_REST_SCHEMA_REGISTRY_URL: 'http://schema-registry:8081'
195194

196195
marklogic:
197-
image: "marklogicdb/marklogic-db:latest-11"
196+
image: "${MARKLOGIC_IMAGE}"
198197
platform: linux/amd64
199198
environment:
200199
- INSTALL_CONVERTERS=true
-1.19 KB
Binary file not shown.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
12
distributionBase=GRADLE_USER_HOME
23
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
4-
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
5+
zipStoreBase=GRADLE_USER_HOME

test-app/gradlew

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +82,12 @@ do
8082
esac
8183
done
8284

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
85+
# This is normally unused
86+
# shellcheck disable=SC2034
8687
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
88+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90+
' "$PWD" ) || exit
9091

9192
# Use the maximum available, or set MAX_FD != -1 to use that value.
9293
MAX_FD=maximum
@@ -133,22 +134,29 @@ location of your Java installation."
133134
fi
134135
else
135136
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137+
if ! command -v java >/dev/null 2>&1
138+
then
139+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137140
138141
Please set the JAVA_HOME variable in your environment to match the
139142
location of your Java installation."
143+
fi
140144
fi
141145

142146
# Increase the maximum file descriptors if we can.
143147
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144148
case $MAX_FD in #(
145149
max*)
150+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
151+
# shellcheck disable=SC2039,SC3045
146152
MAX_FD=$( ulimit -H -n ) ||
147153
warn "Could not query maximum file descriptor limit"
148154
esac
149155
case $MAX_FD in #(
150156
'' | soft) :;; #(
151157
*)
158+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
159+
# shellcheck disable=SC2039,SC3045
152160
ulimit -n "$MAX_FD" ||
153161
warn "Could not set maximum file descriptor limit to $MAX_FD"
154162
esac
@@ -193,11 +201,15 @@ if "$cygwin" || "$msys" ; then
193201
done
194202
fi
195203

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
204+
205+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
206+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207+
208+
# Collect all arguments for the java command:
209+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210+
# and any embedded shellness will be escaped.
211+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212+
# treated as '${Hostname}' itself on the command line.
201213

202214
set -- \
203215
"-Dorg.gradle.appname=$APP_BASE_NAME" \

0 commit comments

Comments
 (0)