Skip to content

Commit

Permalink
Merge pull request #1698 from marklogic/release/7.0
Browse files Browse the repository at this point in the history
Added more "since" annotations and README content on JAXB
  • Loading branch information
rjrudin authored Aug 19, 2024
2 parents 8cc5a64 + 0219b61 commit 3b625db
Show file tree
Hide file tree
Showing 9 changed files with 509 additions and 470 deletions.
911 changes: 452 additions & 459 deletions NOTICE.txt

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,49 @@ Full documentation is available at:
* [Java Application Developer's Guide](http://docs.marklogic.com/guide/java)
* [JavaDoc](http://docs.marklogic.com/javadoc/client/index.html)

## Including JAXB support

As of the 7.0.0 release, the client now depends on the [Jakarta XML Binding](https://eclipse-ee4j.github.io/jaxb-ri/)
API instead of the older [JAXB API](https://docs.oracle.com/javase/tutorial/jaxb/intro/). If you are using Java 11 or
higher, you no longer need to declare additional dependencies in order to use Jakarta XML Binding. If you wish to use
the older JAXB APIs - i.e. those in the `javax.xml.bind` package instead of `jakarta.xml.bind` - you are free to
include those as dependencies in your application; they will not conflict with the 7.0.0 release of the Java Client.

### JAXB support in 6.x releases and older

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,
you will need to include JAXB API and implementation dependencies as those are no longer included in Java 11 and higher.

For Maven, include the following in your pom.xml file:

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
</dependency>

For Gradle, include the following in your build.gradle file (this can be included in the same `dependencies` block
as the one that includes the marklogic-client-api dependency):

dependencies {
implementation "javax.xml.bind:jaxb-api:2.3.1"
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
implementation "org.glassfish.jaxb:jaxb-core:2.3.0.1"
}

You are free to use any implementation of JAXB that you wish, but you need to ensure that you're using a JAXB
implementation that corresponds to the `javax.xml.bind` interfaces.

## Support

The MarkLogic Java Client is maintained by [MarkLogic](https://www.marklogic.com/) Engineering and is made available under
Expand Down
2 changes: 1 addition & 1 deletion examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ dependencies {
api 'com.google.code.gson:gson:2.10.1'
api 'net.sourceforge.htmlcleaner:htmlcleaner:2.29'
api 'com.opencsv:opencsv:4.6'
api 'org.springframework:spring-jdbc:5.3.29'
api 'org.springframework:spring-jdbc:5.3.39'
api 'org.apache.commons:commons-lang3:3.12.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ protected PlanBuilder(
public final SqlExpr sql;
/**
* Builds expressions with vec server functions.
* @since 7.0.0; requires MarkLogic 12 or higher.
*/
public final VecExpr vec;
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public interface PlanBuilderBase {
* @param query The cts.query expression for matching the documents.
* @param qualifierName Specifies a name for qualifying the column names similar to a view name.
* @return a ModifyPlan object
* @since 7.0.0; requires MarkLogic 12 or higher.
*/
PlanBuilder.AccessPlan fromSearchDocs(CtsQueryExpr query, String qualifierName, PlanSearchOptions options);
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
/**
* Builds expressions to call functions in the vec server library for a row
* pipeline.
*
* @since 7.0.0; requires MarkLogic 12 or higher.
*/
public interface VecExpr {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public interface PlanSearchOptions {
XsFloatVal getQualityWeight();
ScoreMethod getScoreMethod();
/**
* @since 7.0.0
* @since 7.0.0; requires MarkLogic 12 or higher.
*/
XsDoubleVal getBm25LengthWeight();
/**
Expand All @@ -27,7 +27,7 @@ public interface PlanSearchOptions {
PlanSearchOptions withQualityWeight(XsFloatVal qualityWeight);
PlanSearchOptions withScoreMethod(ScoreMethod scoreMethod);
/**
* @since 7.0.0
* @since 7.0.0; requires MarkLogic 12 or higher.
*/
PlanSearchOptions withBm25LengthWeight(double bm25LengthWeight);
enum ScoreMethod {
Expand Down
11 changes: 5 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ It is not intended to be used to build this project.
<modelVersion>4.0.0</modelVersion>
<groupId>com.marklogic</groupId>
<artifactId>marklogic-client-api</artifactId>
<version>6.3.0</version>
<version>7.0.0</version>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>3.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
Expand All @@ -34,13 +33,13 @@ It is not intended to be used to build this project.
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.11.0</version>
<version>4.12.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>4.11.0</version>
<version>4.12.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand All @@ -51,8 +50,8 @@ It is not intended to be used to build this project.
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ plugins {
}

dependencies {
implementation "io.undertow:undertow-core:2.2.24.Final"
implementation "io.undertow:undertow-servlet:2.2.24.Final"
implementation "io.undertow:undertow-core:2.2.32.Final"
implementation "io.undertow:undertow-servlet:2.2.32.Final"
implementation "com.marklogic:ml-javaclient-util:4.8.0"
implementation 'org.slf4j:slf4j-api:1.7.36'
implementation 'ch.qos.logback:logback-classic:1.3.14'
Expand Down

0 comments on commit 3b625db

Please sign in to comment.