Skip to content

Commit 0219b61

Browse files
committed
Added more "since" annotations and README content on JAXB
Updated NOTICE and two test-related dependencies to patch releases.
1 parent 8cc5a64 commit 0219b61

File tree

9 files changed

+509
-470
lines changed

9 files changed

+509
-470
lines changed

NOTICE.txt

+452-459
Large diffs are not rendered by default.

README.md

+43
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,49 @@ Full documentation is available at:
4949
* [Java Application Developer's Guide](http://docs.marklogic.com/guide/java)
5050
* [JavaDoc](http://docs.marklogic.com/javadoc/client/index.html)
5151

52+
## Including JAXB support
53+
54+
As of the 7.0.0 release, the client now depends on the [Jakarta XML Binding](https://eclipse-ee4j.github.io/jaxb-ri/)
55+
API instead of the older [JAXB API](https://docs.oracle.com/javase/tutorial/jaxb/intro/). If you are using Java 11 or
56+
higher, you no longer need to declare additional dependencies in order to use Jakarta XML Binding. If you wish to use
57+
the older JAXB APIs - i.e. those in the `javax.xml.bind` package instead of `jakarta.xml.bind` - you are free to
58+
include those as dependencies in your application; they will not conflict with the 7.0.0 release of the Java Client.
59+
60+
### JAXB support in 6.x releases and older
61+
62+
If you are using Java Client 6.x or older and also Java 11 or higher, and you wish to use JAXB with the Java client,
63+
you will need to include JAXB API and implementation dependencies as those are no longer included in Java 11 and higher.
64+
65+
For Maven, include the following in your pom.xml file:
66+
67+
<dependency>
68+
<groupId>javax.xml.bind</groupId>
69+
<artifactId>jaxb-api</artifactId>
70+
<version>2.3.1</version>
71+
</dependency>
72+
<dependency>
73+
<groupId>org.glassfish.jaxb</groupId>
74+
<artifactId>jaxb-runtime</artifactId>
75+
<version>2.3.2</version>
76+
</dependency>
77+
<dependency>
78+
<groupId>org.glassfish.jaxb</groupId>
79+
<artifactId>jaxb-core</artifactId>
80+
<version>2.3.0.1</version>
81+
</dependency>
82+
83+
For Gradle, include the following in your build.gradle file (this can be included in the same `dependencies` block
84+
as the one that includes the marklogic-client-api dependency):
85+
86+
dependencies {
87+
implementation "javax.xml.bind:jaxb-api:2.3.1"
88+
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
89+
implementation "org.glassfish.jaxb:jaxb-core:2.3.0.1"
90+
}
91+
92+
You are free to use any implementation of JAXB that you wish, but you need to ensure that you're using a JAXB
93+
implementation that corresponds to the `javax.xml.bind` interfaces.
94+
5295
## Support
5396

5497
The MarkLogic Java Client is maintained by [MarkLogic](https://www.marklogic.com/) Engineering and is made available under

examples/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ dependencies {
2828
api 'com.google.code.gson:gson:2.10.1'
2929
api 'net.sourceforge.htmlcleaner:htmlcleaner:2.29'
3030
api 'com.opencsv:opencsv:4.6'
31-
api 'org.springframework:spring-jdbc:5.3.29'
31+
api 'org.springframework:spring-jdbc:5.3.39'
3232
api 'org.apache.commons:commons-lang3:3.12.0'
3333
}

marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilder.java

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ protected PlanBuilder(
7575
public final SqlExpr sql;
7676
/**
7777
* Builds expressions with vec server functions.
78+
* @since 7.0.0; requires MarkLogic 12 or higher.
7879
*/
7980
public final VecExpr vec;
8081
/**

marklogic-client-api/src/main/java/com/marklogic/client/expression/PlanBuilderBase.java

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public interface PlanBuilderBase {
5353
* @param query The cts.query expression for matching the documents.
5454
* @param qualifierName Specifies a name for qualifying the column names similar to a view name.
5555
* @return a ModifyPlan object
56+
* @since 7.0.0; requires MarkLogic 12 or higher.
5657
*/
5758
PlanBuilder.AccessPlan fromSearchDocs(CtsQueryExpr query, String qualifierName, PlanSearchOptions options);
5859
/**

marklogic-client-api/src/main/java/com/marklogic/client/expression/VecExpr.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
/**
1919
* Builds expressions to call functions in the vec server library for a row
2020
* pipeline.
21+
*
22+
* @since 7.0.0; requires MarkLogic 12 or higher.
2123
*/
2224
public interface VecExpr {
2325
/**

marklogic-client-api/src/main/java/com/marklogic/client/type/PlanSearchOptions.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public interface PlanSearchOptions {
1414
XsFloatVal getQualityWeight();
1515
ScoreMethod getScoreMethod();
1616
/**
17-
* @since 7.0.0
17+
* @since 7.0.0; requires MarkLogic 12 or higher.
1818
*/
1919
XsDoubleVal getBm25LengthWeight();
2020
/**
@@ -27,7 +27,7 @@ public interface PlanSearchOptions {
2727
PlanSearchOptions withQualityWeight(XsFloatVal qualityWeight);
2828
PlanSearchOptions withScoreMethod(ScoreMethod scoreMethod);
2929
/**
30-
* @since 7.0.0
30+
* @since 7.0.0; requires MarkLogic 12 or higher.
3131
*/
3232
PlanSearchOptions withBm25LengthWeight(double bm25LengthWeight);
3333
enum ScoreMethod {

pom.xml

+5-6
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ It is not intended to be used to build this project.
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>com.marklogic</groupId>
1313
<artifactId>marklogic-client-api</artifactId>
14-
<version>6.3.0</version>
14+
<version>7.0.0</version>
1515
<dependencies>
1616
<dependency>
1717
<groupId>jakarta.xml.bind</groupId>
1818
<artifactId>jaxb-api</artifactId>
1919
<version>3.0.1</version>
20-
<scope>runtime</scope>
2120
</dependency>
2221
<dependency>
2322
<groupId>org.glassfish.jaxb</groupId>
@@ -34,13 +33,13 @@ It is not intended to be used to build this project.
3433
<dependency>
3534
<groupId>com.squareup.okhttp3</groupId>
3635
<artifactId>okhttp</artifactId>
37-
<version>4.11.0</version>
36+
<version>4.12.0</version>
3837
<scope>runtime</scope>
3938
</dependency>
4039
<dependency>
4140
<groupId>com.squareup.okhttp3</groupId>
4241
<artifactId>logging-interceptor</artifactId>
43-
<version>4.11.0</version>
42+
<version>4.12.0</version>
4443
<scope>runtime</scope>
4544
</dependency>
4645
<dependency>
@@ -51,8 +50,8 @@ It is not intended to be used to build this project.
5150
</dependency>
5251
<dependency>
5352
<groupId>com.sun.mail</groupId>
54-
<artifactId>javax.mail</artifactId>
55-
<version>1.6.2</version>
53+
<artifactId>jakarta.mail</artifactId>
54+
<version>2.0.1</version>
5655
<scope>runtime</scope>
5756
</dependency>
5857
<dependency>

test-app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ plugins {
55
}
66

77
dependencies {
8-
implementation "io.undertow:undertow-core:2.2.24.Final"
9-
implementation "io.undertow:undertow-servlet:2.2.24.Final"
8+
implementation "io.undertow:undertow-core:2.2.32.Final"
9+
implementation "io.undertow:undertow-servlet:2.2.32.Final"
1010
implementation "com.marklogic:ml-javaclient-util:4.8.0"
1111
implementation 'org.slf4j:slf4j-api:1.7.36'
1212
implementation 'ch.qos.logback:logback-classic:1.3.14'

0 commit comments

Comments
 (0)