Skip to content

Commit 7c73f9d

Browse files
authored
Merge pull request #1602 from marklogic/release/6.3.0
Merging release/6.3.0 into master
2 parents d6e22f0 + 1bbd6e0 commit 7c73f9d

File tree

67 files changed

+1351
-1211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1351
-1211
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ bin
3333
repairXMLFull.xml
3434
xml-with-props.xml
3535

36+
ml-development-tools/src/test/ml-modules
37+
ml-development-tools/src/test/java/com/marklogic/client/test/dbfunction/generated

CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Lines starting with '#' are comments.
2+
# Each line is a file pattern followed by one or more owners.
3+
4+
# These owners will be the default owners for everything in the repo.
5+
* @anu3990 @billfarber @rjrudin

CONTRIBUTING.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ Individual tests can be run in the following manner (replace `GraphsTest` with t
4141

4242
./gradlew marklogic-client-api:test --tests GraphsTest
4343

44+
Tests for the `ml-development-tools` Gradle plugin can be run via:
45+
46+
./gradlew ml-development-tools:test
47+
4448
You can also undeploy the test application if you do not wish to keep it around on your MarkLogic instance:
4549

4650
./gradlew mlUndeploy -i -Pconfirm=true
51+
52+
To test the `ml-development-tools` Gradle plugin, see the README.md file located at
53+
`ml-development-tools/src/test/example-project`.

Jenkinsfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ def runAllTests(String type, String version, Boolean useReverseProxy){
5050
export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH
5151
cd java-client-api
5252
mkdir -p ml-development-tools/build/test-results/test
53-
./gradlew ml-development-tools:setupTestServer || true
54-
./gradlew ml-development-tools:generateTests || true
5553
./gradlew ml-development-tools:test || true
5654
'''
5755

NOTICE.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6370,7 +6370,7 @@ License Text (http://spdx.org/licenses/Apache-2.0)
63706370
Made available under the Apache License 2.0. See Appendix for full text.
63716371

63726372
Source materials are available for download at: https://github.com/FasterXML/jackson-annotations
6373-
Jackson Annotations 2.14.1
6373+
Jackson Annotations 2.15.2
63746374
Attribution Statements
63756375
http://wiki.fasterxml.com/JacksonHome
63766376

@@ -6403,7 +6403,7 @@ License Text (http://www.apache.org/licenses/LICENSE-2.0.txt)
64036403
Made available under the Apache License 2.0. See Appendix for full text.
64046404

64056405
Source materials are available for download at: https://github.com/FasterXML/jackson-core
6406-
Jackson Core 2.14.1
6406+
Jackson Core 2.15.2
64076407
Attribution Statements
64086408
http://wiki.fasterxml.com/JacksonHome
64096409

@@ -6450,7 +6450,7 @@ License Text (http://www.apache.org/licenses/LICENSE-2.0.txt)
64506450
Made available under the Apache License 2.0. See Appendix for full text.
64516451

64526452
Source materials are available for download at: https://github.com/FasterXML/jackson-databind
6453-
Jackson Databind 2.14.1
6453+
Jackson Databind 2.15.2
64546454
Attribution Statements
64556455
http://wiki.fasterxml.com/JacksonHome
64566456

@@ -6468,7 +6468,7 @@ License Text (http://www.apache.org/licenses/LICENSE-2.0.txt)
64686468
Made available under the Apache License 2.0. See Appendix for full text.
64696469

64706470
Source materials are available for download at: https://github.com/FasterXML/jackson-databind
6471-
Jackson Dataformat CSV 2.10.3
6471+
Jackson Dataformat CSV 2.15.2
64726472
Attribution Statements
64736473
https://github.com/FasterXML/jackson-dataformat-csv
64746474

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
![GitHub release](https://img.shields.io/github/release/marklogic/java-client-api.svg)
2+
![GitHub last commit](https://img.shields.io/github/last-commit/marklogic/java-client-api.svg)
3+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
4+
[![Known Vulnerabilities](https://snyk.io/test/github/marklogic/java-client-api/badge.svg)](https://snyk.io/test/github/marklogic/java-client-api)
5+
16
# The MarkLogic Java Client API
27

38
The API makes it easy to write, read, delete, and find documents

examples/build.gradle

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ dependencies {
1212
}
1313
implementation project(':marklogic-client-api')
1414

15+
// Forcing usage of 3.4.0 instead of 3.2.0 to address vulnerability - https://security.snyk.io/vuln/SNYK-JAVA-COMSQUAREUPOKIO-5820002
16+
implementation 'com.squareup.okio:okio:3.4.0'
17+
1518
// The 'api' configuration is used so that the test configuration in marklogic-client-api doesn't have to declare
1619
// all of these dependencies. This library project won't otherwise be depended on by anything else as it's not
1720
// setup for publishing.
18-
api 'com.squareup.okhttp3:okhttp:4.10.0'
21+
api 'com.squareup.okhttp3:okhttp:4.11.0'
1922
api 'io.github.rburgst:okhttp-digest:2.7'
2023
api 'org.slf4j:slf4j-api:1.7.36'
21-
api 'com.fasterxml.jackson.core:jackson-databind:2.14.1'
24+
api 'com.fasterxml.jackson.core:jackson-databind:2.15.2'
2225

2326
// hsqldb < 2.7 has a High CVE - https://nvd.nist.gov/vuln/detail/CVE-2022-41853 .
2427
// And hsqldb 2.6+ requires Java 11+. So this is ignored, along with the associated test,
@@ -30,7 +33,7 @@ dependencies {
3033
api 'com.google.code.gson:gson:2.10.1'
3134
api 'net.sourceforge.htmlcleaner:htmlcleaner:2.29'
3235
api 'com.opencsv:opencsv:4.6'
33-
api 'org.springframework:spring-jdbc:5.3.27'
36+
api 'org.springframework:spring-jdbc:5.3.29'
3437
api 'org.apache.commons:commons-lang3:3.12.0'
3538
api 'org.apache.httpcomponents:httpclient:4.5.14'
3639
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.marklogic.client.example.cookbook;
2+
3+
import com.marklogic.client.DatabaseClientFactory;
4+
import com.marklogic.client.extra.okhttpclient.OkHttpClientConfigurator;
5+
import okhttp3.OkHttpClient;
6+
import okhttp3.Request;
7+
8+
/**
9+
* Provides examples of configuring the underlying OkHttp client for various use cases.
10+
*/
11+
public class ConfigureOkHttp {
12+
13+
/**
14+
* OkHttp 4.x includes a header of "Accept-Encoding=gzip" by default. The following shows how to use an OkHttp
15+
* interceptor to remove this header from every request. By doing this via a configurator passed to
16+
* {@code DatabaseClientFactory}, every {@code DatabaseClient} created via the factory will inherit this
17+
* interceptor.
18+
*
19+
* Note that while the Accept-Encoding header can contain multiple values - see
20+
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding for examples - the MarkLogic Java
21+
* Client does not set this header and OkHttp only sets it to "gzip" for every request. Thus, removing the
22+
* header should not result in losing any other values besides "gzip" for the header. You are free to
23+
* customize this as you wish though; this is primarily intended as an example for how to customize OkHttp
24+
* when using the MarkLogic Java Client.
25+
*
26+
* As of Java Client 6.3.0, this can now be accomplished via the {@code DatabaseClientFactory} class and
27+
* {@code RemoveAcceptEncodingConfigurator}.
28+
*/
29+
public static void removeAcceptEncodingGzipHeader() {
30+
DatabaseClientFactory.addConfigurator(new OkHttpClientConfigurator() {
31+
@Override
32+
public void configure(OkHttpClient.Builder builder) {
33+
builder.addNetworkInterceptor(chain -> {
34+
Request newRequest = chain.request().newBuilder().removeHeader("Accept-Encoding").build();
35+
return chain.proceed(newRequest);
36+
});
37+
}
38+
});
39+
}
40+
}

examples/src/main/java/com/marklogic/client/example/cookbook/KerberosSSLClientCreator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public X509Certificate[] getAcceptedIssuers() {
6161
};
6262

6363
// create an SSL context
64-
SSLContext sslContext = SSLContext.getInstance("SSLv3");
64+
SSLContext sslContext = SSLContext.getInstance("TLSv1.2");
6565
sslContext.init(null, new TrustManager[] { naiveTrustMgr }, null);
6666

6767
// create the client

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.marklogic
2-
version=6.2.2
2+
version=6.3.0
33
describedName=MarkLogic Java Client API
44
publishUrl=file:../marklogic-java/releases
55

0 commit comments

Comments
 (0)