Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .copyrightconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ startyear: 2010
# - Dotfiles already skipped automatically
# Enable by removing the leading '# ' from the next line and editing values.
# filesexcluded: third_party/*, docs/generated/*.md, assets/*.png, scripts/temp_*.py, vendor/lib.js
filesexcluded: .github/*, README.md, Jenkinsfile, gradle/*, docker-compose.yaml, docker-compose.yml, *.gradle, gradle.properties, gradlew, gradlew.bat, **/test/resources/**, *.md, pom.xml
filesexcluded: .github/*, README.md, Jenkinsfile, gradle/*, docker-compose.yaml, docker-compose.yml, *.gradle, gradle.properties, gradlew, gradlew.bat, **/test/resources/**, *.md, pom.xml, *.properties
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ subprojects {
repositories {
mavenCentral()

mavenLocal()

// Needed so that ml-development-tools can resolve snapshots of marklogic-client-api.
maven {
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
Expand Down
6 changes: 4 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ group=com.marklogic
version=8.0-SNAPSHOT
publishUrl=file:../marklogic-java/releases

okhttpVersion=5.2.0
okhttpVersion=5.3.2

# See https://github.com/FasterXML/jackson for more information on the Jackson libraries.
jacksonVersion=2.20.0
jacksonVersion=2.20.1

junitVersion=6.0.1

# Defined at this level so that they can be set as system properties and used by the marklogic-client-api and test-app
# project
Expand Down
10 changes: 5 additions & 5 deletions marklogic-client-api-functionaltests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@ dependencies {
testImplementation "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4"
testImplementation 'org.skyscreamer:jsonassert:1.5.3'
testImplementation 'org.slf4j:slf4j-api:2.0.17'
testImplementation 'commons-io:commons-io:2.20.0'
testImplementation 'commons-io:commons-io:2.21.0'
testImplementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
testImplementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}"
testImplementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
testImplementation "org.jdom:jdom2:2.0.6.1"

testImplementation 'org.apache.commons:commons-lang3:3.19.0'
testImplementation 'org.apache.commons:commons-lang3:3.20.0'

testImplementation "com.marklogic:ml-app-deployer:6.2-SNAPSHOT"

testImplementation 'ch.qos.logback:logback-classic:1.5.19'
testImplementation 'org.junit.jupiter:junit-jupiter:5.14.0'
testImplementation 'org.xmlunit:xmlunit-legacy:2.10.4'
testImplementation "org.junit.jupiter:junit-jupiter:${junitVersion}"
testImplementation 'org.xmlunit:xmlunit-legacy:2.11.0'

// Without this, once using JUnit 5.12 or higher, Gradle will not find any tests and report an error of:
// org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.14.0"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junitVersion}"
}

tasks.withType(Test).configureEach {
Expand Down
20 changes: 13 additions & 7 deletions marklogic-client-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ plugins {
id 'maven-publish'
}

configurations.all {
// Ensure that no test dependencies below, namely marklogic-junit5, bring in their own version of marklogic-client-api,
// as we only want to use the one built by this project.
exclude group: 'com.marklogic', module: 'marklogic-client-api'
}

dependencies {
// Using the latest version now that the 8.0.0 release requires Java 17.
// This is now an implementation dependency as opposed to an api dependency in 7.x and earlier.
Expand Down Expand Up @@ -36,23 +42,23 @@ dependencies {
compileOnly 'org.dom4j:dom4j:2.2.0'
compileOnly 'com.google.code.gson:gson:2.13.2'

testImplementation 'org.junit.jupiter:junit-jupiter:5.14.0'
testImplementation "com.marklogic:marklogic-junit5:2.0-SNAPSHOT"

testImplementation 'org.xmlunit:xmlunit-legacy:2.10.4'
testImplementation 'org.xmlunit:xmlunit-legacy:2.11.0'
testImplementation project(':examples')

testImplementation 'org.apache.commons:commons-lang3:3.19.0'
testImplementation 'org.apache.commons:commons-lang3:3.20.0'

// Allows talking to the Manage API.
testImplementation "com.marklogic:ml-app-deployer:6.2-SNAPSHOT"

testImplementation "org.mockito:mockito-core:5.20.0"
testImplementation "org.mockito:mockito-core:5.21.0"
testImplementation "org.mockito:mockito-inline:5.2.0"

testImplementation "com.squareup.okhttp3:mockwebserver3:5.2.0"
testImplementation "com.squareup.okhttp3:mockwebserver3:${okhttpVersion}"

testImplementation "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${jacksonVersion}"
testImplementation 'ch.qos.logback:logback-classic:1.5.19'
testImplementation 'ch.qos.logback:logback-classic:1.5.23'

// Using this to avoid a schema validation issue with the regular xercesImpl
testImplementation 'org.opengis.cite.xerces:xercesImpl-xsd11:2.12-beta-r1667115'
Expand All @@ -69,7 +75,7 @@ dependencies {
// https://docs.gradle.org/current/userguide/upgrading_version_8.html#test_framework_implementation_dependencies
// Without this, once using JUnit 5.12 or higher, Gradle will not find any tests and report an error of:
// org.junit.platform.commons.JUnitException: TestEngine with ID 'junit-jupiter' failed to discover tests
testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.14.0"
testRuntimeOnly "org.junit.platform:junit-platform-launcher:${junitVersion}"
}

// Ensure that mlHost and mlPassword can override the defaults of localhost/admin if they've been modified
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void testSSLAuth() throws NoSuchAlgorithmException, KeyManagementExceptio

@Test
// Not able to mock the X509Certificate class on Java 21.
@EnabledOnJre({JRE.JAVA_8, JRE.JAVA_11, JRE.JAVA_17})
@EnabledOnJre({JRE.JAVA_17})
public void testHostnameVerifier() throws SSLException, CertificateParsingException {
// three things our SSLHostnameVerifier will capture
AtomicReference<String> capturedHost = new AtomicReference<>();
Expand Down
5 changes: 4 additions & 1 deletion test-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
buildscript {
repositories {
mavenCentral()

mavenLocal()

// Needed for ml-gradle 6.2-SNAPSHOT
maven {
url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/"
Expand All @@ -26,7 +29,7 @@ dependencies {
implementation "io.undertow:undertow-core:2.3.20.Final"
implementation "io.undertow:undertow-servlet:2.3.20.Final"
implementation 'org.slf4j:slf4j-api:2.0.17'
implementation 'ch.qos.logback:logback-classic:1.5.19'
implementation 'ch.qos.logback:logback-classic:1.5.23'
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}"
implementation "com.squareup.okhttp3:okhttp:${okhttpVersion}"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*=/optic/test,/optic/music
*=/optic/test,/optic/music,test-data
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*=test-data
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*=zipcode
*=zipcode,test-data
11 changes: 6 additions & 5 deletions test-app/src/main/ml-data/sample/collections.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
suggestion.xml=http://some.org/suggestions
first.xml=http://some.org/collection1,http://some.org/collection2
lexicon-test1.xml=http://some.org/collection1,http://some.org/collection2
lexicon-test2.xml=http://some.org/collection1,http://some.org/collection2
second.txt=document-format-query-test
*=test-data
suggestion.xml=http://some.org/suggestions,test-data
first.xml=http://some.org/collection1,http://some.org/collection2,test-data
lexicon-test1.xml=http://some.org/collection1,http://some.org/collection2,test-data
lexicon-test2.xml=http://some.org/collection1,http://some.org/collection2,test-data
second.txt=document-format-query-test,test-data
2 changes: 1 addition & 1 deletion test-app/src/main/ml-data/sample2/collections.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*=http://some.org/suggestions
*=http://some.org/suggestions,test-data