Skip to content

Commit 53158dd

Browse files
DHFPROD-6304: Upgrading to Javaclient 5.3.0
Upgrading to gradle 5.6.4 adding kotlin
1 parent 0763f33 commit 53158dd

File tree

9 files changed

+50
-14
lines changed

9 files changed

+50
-14
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ subprojects {
4848
}
4949

5050
wrapper {
51-
gradleVersion = '4.10'
51+
gradleVersion = '5.6.4'
5252
}
5353

5454
//Task to update versions in files they are hardcoded. If version is hardcoded in any other files in the future,it has to be added to the list
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Wed Apr 03 09:48:19 CEST 2019
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip

gradlew

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ APP_NAME="Gradle"
2828
APP_BASE_NAME=`basename "$0"`
2929

3030
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31-
DEFAULT_JVM_OPTS=""
31+
DEFAULT_JVM_OPTS='"-Xmx64m"'
3232

3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"

gradlew.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set APP_BASE_NAME=%~n0
1414
set APP_HOME=%DIRNAME%
1515

1616
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17-
set DEFAULT_JVM_OPTS=
17+
set DEFAULT_JVM_OPTS="-Xmx64m"
1818

1919
@rem Find java.exe
2020
if defined JAVA_HOME goto findJavaFromJavaHome

marklogic-data-hub/build.gradle

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@ plugins {
77
id 'com.moowork.node' version '1.1.1'
88
id 'org.springframework.boot' version '2.1.3.RELEASE'
99
id "io.spring.dependency-management" version "1.0.7.RELEASE"
10-
id 'com.marklogic.ml-development-tools' version '4.2.0'
10+
id 'com.marklogic.ml-development-tools' version '5.3.2'
1111
}
1212

1313
mainClassName='com.marklogic.hub.ApplicationConfig'
1414
repositories {
15+
//ToDo: Remove this once java-client-api-5.3.2 is released
16+
maven {url 'http://distro.marklogic.com/nexus/repository/maven-releases/'}
1517
jcenter()
1618
maven { url 'http://repo.spring.io/milestone' }
1719
maven { url 'https://developer.marklogic.com/maven2/' }
1820

1921
// Needed for marklogic-junit
2022
maven { url 'https://dl.bintray.com/marklogic-community/Maven/' }
23+
2124
}
2225

2326
group = 'com.marklogic'
@@ -32,17 +35,32 @@ ext.junitPlatformVersion = '1.4.0'
3235
ext.junitJupiterVersion = '5.4.0'
3336

3437
dependencies {
35-
compile 'com.marklogic:marklogic-client-api:4.2.0'
36-
compile('com.marklogic:ml-app-deployer:3.16.3'){
38+
// Forcing use of 1.3.71 - which is what OkHttp 4.7.2 wants, which is what Java Client 5.3 uses - so that 1.2.x
39+
// versions don't come onto the classpath
40+
compile "org.jetbrains.kotlin:kotlin-stdlib:1.3.71"
41+
compile "org.jetbrains.kotlin:kotlin-stdlib-common:1.3.71"
42+
compile ('com.marklogic:marklogic-client-api:5.3.2'){
43+
exclude group: 'com.fasterxml.woodstox', module: 'woodstox-core'
44+
// Oddly, the OkHttp 4.4.0 dependency includes version 1.2.70 and 1.3.x of these dependencies. This causes
45+
// class conflict errors. So they're excluded from here, and we force inclusion of 1.3.x below.
46+
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
47+
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
48+
}
49+
compile('com.marklogic:ml-app-deployer:4.1.0'){
3750
exclude group: 'org.springframework', module: 'http'
51+
// prefer the version declared above
52+
exclude group: 'com.marklogic', module: 'marklogic-client-api'
3853
}
3954

4055
compile group: 'org.springframework.boot', name: 'spring-boot', version: '2.1.3.RELEASE'
4156
compile group: 'org.springframework.integration', name: 'spring-integration-http', version: '5.1.3.RELEASE'
4257
compile group: 'org.springframework.boot', name: 'spring-boot-autoconfigure', version: '2.1.3.RELEASE'
4358

4459
compile 'com.marklogic:mlcp-util:0.9.0'
45-
compile 'com.marklogic:marklogic-data-movement-components:1.0'
60+
compile ('com.marklogic:marklogic-data-movement-components:2.2.0'){
61+
// prefer the version declared above
62+
exclude group: 'com.marklogic', module: 'marklogic-client-api'
63+
}
4664
compile 'commons-io:commons-io:2.4'
4765
compile 'org.apache.commons:commons-text:1.1'
4866

@@ -78,7 +96,10 @@ dependencies {
7896
}
7997

8098
// Provides support for invoking marklogic-unit-test tests via JUnit
81-
testCompile "com.marklogic:marklogic-junit:1.0.beta"
99+
testCompile ("com.marklogic:marklogic-junit:1.0.beta"){
100+
// prefer the version declared above
101+
exclude group: 'com.marklogic', module: 'marklogic-client-api'
102+
}
82103
mlBundle "com.marklogic:marklogic-unit-test-modules:1.0.beta"
83104
}
84105

marklogic-data-hub/src/main/java/com/marklogic/hub/deploy/commands/GenerateHubTDETemplateCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void execute(CommandContext context) {
7474

7575
if (!entityNameFileMap.isEmpty()) {
7676
logger.warn("About to generate a template for the following entities: {} into directory {} ",
77-
this.entityNamesList.isEmpty() ? entityNameFileMap.keySet() : this.entityNamesList, hubConfig.getAppConfig().getSchemasPath());
77+
this.entityNamesList.isEmpty() ? entityNameFileMap.keySet() : this.entityNamesList, hubConfig.getAppConfig().getSchemaPaths());
7878
List<GeneratedCode> generatedCodes = new ArrayList<>();
7979
for (File f : entityNameFileMap.values()) {
8080
File esModel;

marklogic-data-hub/src/main/java/com/marklogic/hub/impl/HubConfigImpl.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,9 @@ private void updateAppConfig(AppConfig config) {
19401940

19411941
initializeModulePaths(config);
19421942

1943-
config.setSchemasPath(getUserSchemasDir().toString());
1943+
List<String> schemaPaths = new ArrayList<>();
1944+
schemaPaths.add(getUserSchemasDir().toString());
1945+
config.setSchemaPaths(schemaPaths);
19441946

19451947
addDhfPropertiesToCustomTokens(config);
19461948

ml-data-hub-plugin/build.gradle

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,17 +49,22 @@ repositories {
4949
mavenCentral()
5050
maven { url 'http://repo.spring.io/milestone' }
5151
maven { url 'http://developer.marklogic.com/maven2' }
52+
//ToDo: Remove this once java-client-api-5.3.2 is released
53+
maven {url 'http://distro.marklogic.com/nexus/repository/maven-releases/'}
5254
}
5355

5456
dependencies {
5557
compile gradleApi()
5658
compile (project(':marklogic-data-hub')) {
5759
exclude group: 'ch.qos.logback'
60+
exclude group: "com.squareup.okhttp3", module: "okhttp"
61+
exclude group: "com.squareup.okhttp3", module: "logging-interceptor"
5862
}
5963
compile ('com.marklogic:ml-gradle:3.16.3') {
6064
exclude group: 'ch.qos.logback'
6165
}
62-
66+
compile "com.squareup.okhttp3:okhttp:4.4.0"
67+
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
6368
testCompile localGroovy()
6469
testCompile gradleTestKit()
6570
testCompile 'xmlunit:xmlunit:1.3'

web/build.gradle

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ bootWar {
4646
repositories {
4747
jcenter()
4848
maven {url 'http://developer.marklogic.com/maven2/'}
49+
//ToDo: Remove this once java-client-api-5.3.2 is released
50+
maven {url 'http://distro.marklogic.com/nexus/repository/maven-releases/'}
4951
}
5052

5153
sourceCompatibility = 1.8
@@ -69,7 +71,14 @@ dependencies {
6971

7072
compile("org.aspectj:aspectjweaver:1.8.9")
7173
compile("org.springframework:spring-messaging")
72-
compile project(":marklogic-data-hub")
74+
compile "org.jetbrains.kotlin:kotlin-stdlib:1.3.61"
75+
compile "org.jetbrains.kotlin:kotlin-stdlib-common:1.3.61"
76+
compile(project(":marklogic-data-hub")){
77+
exclude group: "com.squareup.okhttp3", module: "okhttp"
78+
exclude group: "com.squareup.okhttp3", module: "logging-interceptor"
79+
}
80+
compile "com.squareup.okhttp3:okhttp:4.4.0"
81+
compile "com.squareup.okhttp3:logging-interceptor:4.4.0"
7382
compile("org.apache.commons:commons-csv:1.4")
7483

7584
// Optional Boot library - see https://docs.spring.io/spring-boot/docs/current/reference/html/using-boot-devtools.html

0 commit comments

Comments
 (0)