diff --git a/.copyrightconfig b/.copyrightconfig index ba242e11f..25e785b7c 100644 --- a/.copyrightconfig +++ b/.copyrightconfig @@ -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 diff --git a/build.gradle b/build.gradle index b71510d5f..d83bfdc8c 100644 --- a/build.gradle +++ b/build.gradle @@ -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/" diff --git a/gradle.properties b/gradle.properties index ce21d2cfa..7e8c4ac9b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/marklogic-client-api-functionaltests/build.gradle b/marklogic-client-api-functionaltests/build.gradle index 0bfccada1..2dcda2303 100755 --- a/marklogic-client-api-functionaltests/build.gradle +++ b/marklogic-client-api-functionaltests/build.gradle @@ -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 { diff --git a/marklogic-client-api/build.gradle b/marklogic-client-api/build.gradle index 11855b87b..23b984883 100644 --- a/marklogic-client-api/build.gradle +++ b/marklogic-client-api/build.gradle @@ -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. @@ -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' @@ -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 diff --git a/marklogic-client-api/src/test/java/com/marklogic/client/test/ssl/SSLTest.java b/marklogic-client-api/src/test/java/com/marklogic/client/test/ssl/SSLTest.java index 366bc6074..933ec2e77 100644 --- a/marklogic-client-api/src/test/java/com/marklogic/client/test/ssl/SSLTest.java +++ b/marklogic-client-api/src/test/java/com/marklogic/client/test/ssl/SSLTest.java @@ -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 capturedHost = new AtomicReference<>(); diff --git a/test-app/build.gradle b/test-app/build.gradle index 80a907488..f8d21f472 100644 --- a/test-app/build.gradle +++ b/test-app/build.gradle @@ -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/" @@ -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}" } diff --git a/test-app/src/main/ml-data/optic/test/collections.properties b/test-app/src/main/ml-data/optic/test/collections.properties index ee57b7b93..6ba0c7efd 100644 --- a/test-app/src/main/ml-data/optic/test/collections.properties +++ b/test-app/src/main/ml-data/optic/test/collections.properties @@ -1 +1 @@ -*=/optic/test,/optic/music +*=/optic/test,/optic/music,test-data diff --git a/test-app/src/main/ml-data/optic/vectors/collections.properties b/test-app/src/main/ml-data/optic/vectors/collections.properties new file mode 100644 index 000000000..a777f445c --- /dev/null +++ b/test-app/src/main/ml-data/optic/vectors/collections.properties @@ -0,0 +1 @@ +*=test-data diff --git a/test-app/src/main/ml-data/optic/zipcodes/collections.properties b/test-app/src/main/ml-data/optic/zipcodes/collections.properties index 0b92404e2..175de43d4 100644 --- a/test-app/src/main/ml-data/optic/zipcodes/collections.properties +++ b/test-app/src/main/ml-data/optic/zipcodes/collections.properties @@ -1 +1 @@ -*=zipcode +*=zipcode,test-data diff --git a/test-app/src/main/ml-data/sample/collections.properties b/test-app/src/main/ml-data/sample/collections.properties index e41971f1e..ffb43069a 100644 --- a/test-app/src/main/ml-data/sample/collections.properties +++ b/test-app/src/main/ml-data/sample/collections.properties @@ -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 diff --git a/test-app/src/main/ml-data/sample2/collections.properties b/test-app/src/main/ml-data/sample2/collections.properties index e7d83da23..ebdc32646 100644 --- a/test-app/src/main/ml-data/sample2/collections.properties +++ b/test-app/src/main/ml-data/sample2/collections.properties @@ -1 +1 @@ -*=http://some.org/suggestions +*=http://some.org/suggestions,test-data