diff --git a/.copyrightconfig b/.copyrightconfig index 9361dba86..b8facc184 100644 --- a/.copyrightconfig +++ b/.copyrightconfig @@ -11,4 +11,4 @@ startyear: 2015 # - 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.yml, *.gradle, gradle.properties, gradlew, gradlew.bat \ No newline at end of file +filesexcluded: .github/*, Jenkinsfile, gradle/*, docker-compose.yml, *.gradle, gradle.properties, gradlew, gradlew.bat, **test/resources/**, *.md diff --git a/NOTICE.txt b/NOTICE.txt index 0425c2597..308bd1774 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -11,42 +11,42 @@ product and version for which you are requesting source code. Third Party Notices commons-io 2.20.0 (Apache-2.0) -commons-lang3 3.18.0 (Apache-2.0) -jackson-databind 2.19.0 (Apache-2.0) -jaxen 2.0.0 (Apache-2.0) +commons-lang3 3.19.0 (Apache-2.0) +jackson-databind 2.20.0 (Apache-2.0) +jaxen 2.0.0 (Jaxen Custom BSD-like License) jdom2 2.0.6.1 (Apache-2.0) -marklogic-client-api 7.2.0 (Apache-2.0) +marklogic-client-api 8.0.0 (Apache-2.0) marklogic-xcc 12.0.0 (Apache-2.0) -okhttp 4.12.0 (Apache-2.0) +okhttp 5.2.0 (Apache-2.0) slf4j-api 2.0.17 (MIT) spring-web 6.2.11 (Apache-2.0) zjsonpatch 0.4.16 (Apache-2.0) Third-Party Components -The following is a list of the third-party components used by Progress® MarkLogic® Ml-gradle 6.0.1 (last updated September 22nd, 2025): +The following is a list of the third-party components used by Progress® MarkLogic® Ml-gradle 6.1.0 (last updated October 15th, 2025): commons-io 2.20.0 (Apache-2.0) https://repo1.maven.org/maven2/commons-io/commons-io/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) -commons-lang3 3.18.0 (Apache-2.0) +commons-lang3 3.19.0 (Apache-2.0) https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) -jackson-databind 2.19.0 (Apache-2.0) +jackson-databind 2.20.0 (Apache-2.0) https://repo1.maven.org/maven2/com/fasterxml/jackson/core/jackson-databind/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) -jaxen 2.0.0 (Apache-2.0) +jaxen 2.0.0 (Jaxen custom BSD-like license) https://repo1.maven.org/maven2/jaxen/jaxen/ -For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) +For the full text of the Jaxen Custom BSD-like License, see Jaxen Custom BSD-like License jdom2 2.0.6.1 (Apache-2.0) https://repo1.maven.org/maven2/org/jdom/jdom2/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) -marklogic-client-api 7.2.0 (Apache-2.0) +marklogic-client-api 8.0.0 (Apache-2.0) https://repo1.maven.org/maven2/com/marklogic/marklogic-client-api/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) @@ -54,7 +54,7 @@ marklogic-xcc 12.0.0 (Apache-2.0) https://repo1.maven.org/maven2/com/marklogic/marklogic-xcc/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) -okhttp 4.12.0 (Apache-2.0) +okhttp 5.2.0 (Apache-2.0) https://repo1.maven.org/maven2/com/squareup/okhttp3/okhttp/ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) @@ -72,11 +72,18 @@ For the full text of the Apache-2.0 license, see Apache License 2.0 (Apache-2.0) Common Licenses -The following is a list of the common licenses used by Progress® MarkLogic® Ml-gradle 6.0.1 (last updated September 22nd, 2025): +The following is a list of the common licenses used by Progress® MarkLogic® Ml-gradle 6.1.0 (last updated October 15th, 2025): Apache License 2.0 (Apache-2.0) https://spdx.org/licenses/Apache-2.0.html +Jaxen custom permissive license +https://github.com/jaxen-xpath/jaxen/blob/master/LICENSE.txt + +MIT License (MIT) for slf4j +https://www.slf4j.org/license.html + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -151,10 +158,10 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -The MIT License -https://opensource.org/licenses/MIT +The MIT License for slf4j +https://www.slf4j.org/license.html -Copyright (c) 2011 Dominic Tarr +Copyright (c) 2004-2025 QOS.ch Permission is hereby granted, free of charge, to any person obtaining a copy of this software and @@ -177,3 +184,35 @@ ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Jaxen Custom BSD-like License +https://github.com/jaxen-xpath/jaxen/blob/master/LICENSE.txt + +Copyright 2003-2006 The Werken Company. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Jaxen Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build.gradle b/build.gradle index 802457210..99e9ca028 100644 --- a/build.gradle +++ b/build.gradle @@ -14,7 +14,8 @@ subprojects { repositories { mavenCentral() - mavenLocal() + + // Temporarily using to depend on marklogic-junit5 snapshot until it's released. maven { url = "https://bed-artifactory.bedford.progress.com:443/artifactory/ml-maven-snapshots/" } @@ -23,13 +24,13 @@ subprojects { 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.13.4" + testRuntimeOnly "org.junit.platform:junit-platform-launcher:1.14.0" - testImplementation 'org.junit.jupiter:junit-jupiter:5.13.4' + testImplementation 'org.junit.jupiter:junit-jupiter:5.14.0' testImplementation "org.springframework:spring-test:${springVersion}" // Forcing Spring to use logback instead of commons-logging - testImplementation "ch.qos.logback:logback-classic:1.5.18" + testImplementation "ch.qos.logback:logback-classic:1.5.19" testImplementation 'org.slf4j:jcl-over-slf4j:2.0.17' testImplementation 'org.slf4j:slf4j-api:2.0.17' } diff --git a/examples/alert-project/build.gradle b/examples/alert-project/build.gradle index 3fb692878..7583adfda 100644 --- a/examples/alert-project/build.gradle +++ b/examples/alert-project/build.gradle @@ -1,7 +1,7 @@ plugins { id "java" id "eclipse" - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } repositories { diff --git a/examples/corb2-project/build.gradle b/examples/corb2-project/build.gradle index 63d45658a..556d8a13a 100644 --- a/examples/corb2-project/build.gradle +++ b/examples/corb2-project/build.gradle @@ -21,7 +21,7 @@ buildscript { } plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } repositories { diff --git a/examples/cpf-project/build.gradle b/examples/cpf-project/build.gradle index 77da63017..e20b5fa4d 100644 --- a/examples/cpf-project/build.gradle +++ b/examples/cpf-project/build.gradle @@ -1,7 +1,7 @@ plugins { id "java" id "eclipse" - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } repositories { diff --git a/examples/custom-forests-and-replicas-project/build.gradle b/examples/custom-forests-and-replicas-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/custom-forests-and-replicas-project/build.gradle +++ b/examples/custom-forests-and-replicas-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/custom-rest-rewriter-project/build.gradle b/examples/custom-rest-rewriter-project/build.gradle index 76e8b422a..add1365ba 100644 --- a/examples/custom-rest-rewriter-project/build.gradle +++ b/examples/custom-rest-rewriter-project/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } task generateCustomRewriterModules { diff --git a/examples/data-services/build.gradle b/examples/data-services/build.gradle index 85d544bf0..fd6e34695 100644 --- a/examples/data-services/build.gradle +++ b/examples/data-services/build.gradle @@ -1,8 +1,8 @@ plugins { id "java" id "net.saliman.properties" version "1.5.2" - id "com.marklogic.ml-gradle" version "6.0.0" - id 'com.marklogic.ml-development-tools' version '7.2.0' + id "com.marklogic.ml-gradle" version "6.1.0" + id 'com.marklogic.ml-development-tools' version '8.0.0' } task generateHelloWorld(type: com.marklogic.client.tools.gradle.EndpointProxiesGenTask) { @@ -20,12 +20,12 @@ test { dependencies { implementation 'org.slf4j:slf4j-api:2.0.17' - implementation 'com.marklogic:marklogic-client-api:7.2.0' + implementation 'com.marklogic:marklogic-client-api:8.0.0' testImplementation "org.junit.jupiter:junit-jupiter:5.12.2" // Force usage of logback for logging - testImplementation "ch.qos.logback:logback-classic:1.5.18" + testImplementation "ch.qos.logback:logback-classic:1.5.19" testImplementation "org.slf4j:jcl-over-slf4j:2.0.17" testImplementation "org.slf4j:slf4j-api:2.0.17" } diff --git a/examples/dependency-project/ml-gradle-client-project/build.gradle b/examples/dependency-project/ml-gradle-client-project/build.gradle index cf929627e..40a20876e 100644 --- a/examples/dependency-project/ml-gradle-client-project/build.gradle +++ b/examples/dependency-project/ml-gradle-client-project/build.gradle @@ -1,6 +1,6 @@ plugins { id "net.saliman.properties" version "1.5.2" - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } repositories { diff --git a/examples/disconnected-project-using-plugins-and-gradlew/build.gradle b/examples/disconnected-project-using-plugins-and-gradlew/build.gradle index 9114dffe9..b845e1d15 100644 --- a/examples/disconnected-project-using-plugins-and-gradlew/build.gradle +++ b/examples/disconnected-project-using-plugins-and-gradlew/build.gradle @@ -14,7 +14,7 @@ buildscript { plugins { id 'java' //optional - delete if not needed id 'net.saliman.properties' version '1.5.2' - id 'com.marklogic.ml-gradle' version "6.0.0" + id 'com.marklogic.ml-gradle' version "6.1.0" } repositories { diff --git a/examples/disconnected-project/gradle.properties b/examples/disconnected-project/gradle.properties index 2ae2f9df0..59557e8ed 100644 --- a/examples/disconnected-project/gradle.properties +++ b/examples/disconnected-project/gradle.properties @@ -1,4 +1,4 @@ -mlGradleDependency=com.marklogic:ml-gradle:6.0.0 +mlGradleDependency=com.marklogic:ml-gradle:6.1.0 mlSalimanDependency=net.saliman:gradle-properties-plugin:1.4.6 mlHost=localhost diff --git a/examples/entity-services-project/build.gradle b/examples/entity-services-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/entity-services-project/build.gradle +++ b/examples/entity-services-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/external-security/build.gradle b/examples/external-security/build.gradle index fede70f25..88756210a 100644 --- a/examples/external-security/build.gradle +++ b/examples/external-security/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/failover-project/build.gradle b/examples/failover-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/failover-project/build.gradle +++ b/examples/failover-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/flexrep-project/build.gradle b/examples/flexrep-project/build.gradle index 0a4b0ddcc..7c3f8825d 100644 --- a/examples/flexrep-project/build.gradle +++ b/examples/flexrep-project/build.gradle @@ -11,7 +11,7 @@ */ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } ext { diff --git a/examples/flexrep-with-path-project/build.gradle b/examples/flexrep-with-path-project/build.gradle index f96971a7c..b1575dc7d 100644 --- a/examples/flexrep-with-path-project/build.gradle +++ b/examples/flexrep-with-path-project/build.gradle @@ -4,7 +4,7 @@ buildscript { mavenLocal() } dependencies { - classpath "com.marklogic:ml-gradle:6.0.0" + classpath "com.marklogic:ml-gradle:6.1.0" } } diff --git a/examples/ignore-resources-project/build.gradle b/examples/ignore-resources-project/build.gradle index 28e87824f..b77cba35a 100644 --- a/examples/ignore-resources-project/build.gradle +++ b/examples/ignore-resources-project/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } ext { diff --git a/examples/jdbc-project/build.gradle b/examples/jdbc-project/build.gradle index f9ff96678..655b9c3a6 100644 --- a/examples/jdbc-project/build.gradle +++ b/examples/jdbc-project/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" id "java" } diff --git a/examples/local-testing-project/gradle.properties b/examples/local-testing-project/gradle.properties index a3e4f2800..e43fe1559 100644 --- a/examples/local-testing-project/gradle.properties +++ b/examples/local-testing-project/gradle.properties @@ -1,6 +1,6 @@ # Set this to the version you used when running # "gradle -Pversion=(something) publishToMavenLocal" on your local ml-gradle repo -mlGradleVersion=6.0-SNAPSHOT +mlGradleVersion=6.1-SNAPSHOT mlHost=localhost mlAppName=example diff --git a/examples/marklogic-cloud-project/gradle.properties b/examples/marklogic-cloud-project/gradle.properties index 414fd11dc..a633cc98b 100644 --- a/examples/marklogic-cloud-project/gradle.properties +++ b/examples/marklogic-cloud-project/gradle.properties @@ -1,6 +1,6 @@ # Set this to the version you used when running # "gradle -Pversion=(something) publishToMavenLocal" on your local ml-gradle repo -mlGradleVersion=6.0.0 +mlGradleVersion=6.1.0 mlAppName=cloud-test diff --git a/examples/maven-project/build.gradle b/examples/maven-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/maven-project/build.gradle +++ b/examples/maven-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/mimetypes-project/build.gradle b/examples/mimetypes-project/build.gradle index 5f985df71..e83e37248 100644 --- a/examples/mimetypes-project/build.gradle +++ b/examples/mimetypes-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/minimal-project/build.gradle b/examples/minimal-project/build.gradle index d46559522..2076a7b9b 100644 --- a/examples/minimal-project/build.gradle +++ b/examples/minimal-project/build.gradle @@ -7,5 +7,5 @@ */ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/mlcp-project/build.gradle b/examples/mlcp-project/build.gradle index 4a12259fe..a045516a0 100644 --- a/examples/mlcp-project/build.gradle +++ b/examples/mlcp-project/build.gradle @@ -10,7 +10,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.marklogic:ml-gradle:6.0.0" + classpath "com.marklogic:ml-gradle:6.1.0" } } @@ -31,7 +31,7 @@ dependencies { // Since MLCP 11.2, have not been able to get logging to work via a log4j2.xml or // log4j2.properties file. MLCP 11.2 removed logback as a direct dependency. Adding it back // results in logging working correctly. - mlcp "ch.qos.logback:logback-classic:1.5.18" + mlcp "ch.qos.logback:logback-classic:1.5.19" /** * mlcp uses logback for logging, and without a logback configuration file, no MLCP logging will appear. diff --git a/examples/no-appservers-project/build.gradle b/examples/no-appservers-project/build.gradle index 5f985df71..e83e37248 100644 --- a/examples/no-appservers-project/build.gradle +++ b/examples/no-appservers-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/partition-project/gradle.properties b/examples/partition-project/gradle.properties index 2d50cc16f..d9fa0e4b6 100644 --- a/examples/partition-project/gradle.properties +++ b/examples/partition-project/gradle.properties @@ -1,4 +1,4 @@ -mlGradleVersion=6.0.0 +mlGradleVersion=6.1.0 mlHost=localhost mlAppName=partition-example diff --git a/examples/properties-project/build.gradle b/examples/properties-project/build.gradle index d5ebb9234..4d4059a7c 100644 --- a/examples/properties-project/build.gradle +++ b/examples/properties-project/build.gradle @@ -3,7 +3,7 @@ plugins { // processing the gradle-(environmentName).properties files. id "net.saliman.properties" version "1.5.2" - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } task printHost { diff --git a/examples/qbv-example/build.gradle b/examples/qbv-example/build.gradle index 20ab752bf..ceaee57a6 100644 --- a/examples/qbv-example/build.gradle +++ b/examples/qbv-example/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } repositories { diff --git a/examples/redaction-ruleset-project/build.gradle b/examples/redaction-ruleset-project/build.gradle index b7c92cb7f..8abd05d9a 100644 --- a/examples/redaction-ruleset-project/build.gradle +++ b/examples/redaction-ruleset-project/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } repositories { diff --git a/examples/role-project/build.gradle b/examples/role-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/role-project/build.gradle +++ b/examples/role-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/roxy-project/build.gradle b/examples/roxy-project/build.gradle index 43a8dac7e..69f02c619 100644 --- a/examples/roxy-project/build.gradle +++ b/examples/roxy-project/build.gradle @@ -4,7 +4,7 @@ buildscript { mavenLocal() } dependencies { - classpath "com.marklogic:ml-gradle:6.0.0" + classpath "com.marklogic:ml-gradle:6.1.0" } } diff --git a/examples/sample-project/build.gradle b/examples/sample-project/build.gradle index 580a992c1..892de873c 100644 --- a/examples/sample-project/build.gradle +++ b/examples/sample-project/build.gradle @@ -8,7 +8,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.marklogic:ml-gradle:6.0.1" + classpath "com.marklogic:ml-gradle:6.1.0" } } diff --git a/examples/schemas-project/build.gradle b/examples/schemas-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/schemas-project/build.gradle +++ b/examples/schemas-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/ssl-2way-project/build.gradle b/examples/ssl-2way-project/build.gradle index a7b9b6b87..332fc8b38 100644 --- a/examples/ssl-2way-project/build.gradle +++ b/examples/ssl-2way-project/build.gradle @@ -1,6 +1,6 @@ plugins { id "net.saliman.properties" version "1.5.2" - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/ssl-project/build.gradle b/examples/ssl-project/build.gradle index bc90c891e..2d68615a1 100644 --- a/examples/ssl-project/build.gradle +++ b/examples/ssl-project/build.gradle @@ -1,6 +1,6 @@ plugins { id "net.saliman.properties" version "1.5.2" - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } /* diff --git a/examples/temporal-lsqt-project/build.gradle b/examples/temporal-lsqt-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/temporal-lsqt-project/build.gradle +++ b/examples/temporal-lsqt-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/temporal-project/build.gradle b/examples/temporal-project/build.gradle index fede70f25..88756210a 100644 --- a/examples/temporal-project/build.gradle +++ b/examples/temporal-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/triggers-project/build.gradle b/examples/triggers-project/build.gradle index 7fe134b45..bb88d0b02 100644 --- a/examples/triggers-project/build.gradle +++ b/examples/triggers-project/build.gradle @@ -4,7 +4,7 @@ buildscript { mavenLocal() } dependencies { - classpath "com.marklogic:ml-gradle:6.0.0" + classpath "com.marklogic:ml-gradle:6.1.0" } } diff --git a/examples/uni-temporal-project/build.gradle b/examples/uni-temporal-project/build.gradle index 5f985df71..e83e37248 100644 --- a/examples/uni-temporal-project/build.gradle +++ b/examples/uni-temporal-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } diff --git a/examples/unit-test-project/README.md b/examples/unit-test-project/README.md index 73034f3c4..8651d467e 100644 --- a/examples/unit-test-project/README.md +++ b/examples/unit-test-project/README.md @@ -12,7 +12,7 @@ include this by default (not every ml-gradle user will use marklogic-unit-test), mavenCentral() } dependencies { - classpath "com.marklogic:marklogic-unit-test-client:1.1.0" + classpath "com.marklogic:marklogic-unit-test-client:1.5.0" } } diff --git a/examples/unit-test-project/gradle.properties b/examples/unit-test-project/gradle.properties index 11b7f2990..f72dc0b90 100644 --- a/examples/unit-test-project/gradle.properties +++ b/examples/unit-test-project/gradle.properties @@ -1,4 +1,4 @@ -mlGradleVersion=6.0.0 +mlGradleVersion=6.1.0 marklogicUnitTestVersion=1.5.0 mlHost=localhost diff --git a/examples/use-modulesdb-project/build.gradle b/examples/use-modulesdb-project/build.gradle index 59ea99bcd..effbc2552 100644 --- a/examples/use-modulesdb-project/build.gradle +++ b/examples/use-modulesdb-project/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "6.0.0" + id "com.marklogic.ml-gradle" version "6.1.0" } ext { diff --git a/gradle.properties b/gradle.properties index 59cec0b61..7b018beaa 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,8 +1,8 @@ -version=6.0.1 +version=6.1.0 # See https://github.com/FasterXML/jackson for more information the Jackson libraries. # This should match the version used by the MarkLogic Java Client. -jacksonVersion=2.19.0 +jacksonVersion=2.20.0 springVersion=6.2.11 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 249e5832f..1b33c55ba 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a9bb508c5..d4081da47 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 9d82f7891..23d15a936 100755 --- a/gradlew +++ b/gradlew @@ -1,74 +1,129 @@ -#!/usr/bin/env bash +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum -warn ( ) { +warn () { echo "$*" -} +} >&2 -die ( ) { +die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null +CLASSPATH="\\\"\\\"" -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -77,84 +132,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac fi -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) fi - i=$((i+1)) + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 5f192121e..5eed7ee84 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,90 +1,94 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH= + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/ml-app-deployer/build.gradle b/ml-app-deployer/build.gradle index 98e921111..c618504c1 100644 --- a/ml-app-deployer/build.gradle +++ b/ml-app-deployer/build.gradle @@ -7,18 +7,21 @@ dependencies { // For wrangling JSON. api "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" + // For compiling JAXB code; marklogic-client-api brings this in at runtime. + compileOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4" + // For resolving XPath expressions against XML documents. implementation 'jaxen:jaxen:2.0.0' // Must depend on this as it's not an API dependency of the Java Client, and we have some code // that requires OkHttp for compilation. - implementation 'com.squareup.okhttp3:okhttp:4.12.0' + implementation 'com.squareup.okhttp3:okhttp:5.2.0' // For parsing/manipulating XML. implementation 'org.jdom:jdom2:2.0.6.1' // For EqualsBuilder; added in 3.8.1 to support detecting if a mimetype's properties have changed or not - implementation "org.apache.commons:commons-lang3:3.18.0" + implementation "org.apache.commons:commons-lang3:3.19.0" // For PreviewInterceptor; can be excluded if that feature is not used implementation("com.flipkart.zjsonpatch:zjsonpatch:0.4.16") { @@ -26,11 +29,12 @@ dependencies { exclude module: "jackson-databind" } + // Need this for compiling tests too. + testCompileOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4" + testImplementation 'commons-io:commons-io:2.19.0' testImplementation 'xmlunit:xmlunit:1.6' - testImplementation ("com.marklogic:marklogic-junit5:1.5.0") { - // Use the version of ml-javaclient-util within this repository. - exclude module: "ml-javaclient-util" - } + // Gradle will alter this to use the ml-javaclient-util project in this repository. + testImplementation "com.marklogic:marklogic-junit5:2.0-SNAPSHOT" } diff --git a/ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/temporal/DeployTemporalCollectionsLSQTCommand.java b/ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/temporal/DeployTemporalCollectionsLSQTCommand.java index 17813a73e..55f5dd71f 100644 --- a/ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/temporal/DeployTemporalCollectionsLSQTCommand.java +++ b/ml-app-deployer/src/main/java/com/marklogic/appdeployer/command/temporal/DeployTemporalCollectionsLSQTCommand.java @@ -54,8 +54,8 @@ protected void deployTemporalCollectionsLsqt(CommandContext context, ConfigDir c } private String makeTemporalCollectionName(String filename) { - // use filename without suffix as temporal collection - return filename.endsWith(".xml") || filename.endsWith(".json") ? - filename.substring(0, filename.length() - 4) : filename; + // The convention is for the filename to be the temporal collection name with .xml or .json. + int pos = filename.lastIndexOf("."); + return pos > -1 ? filename.substring(0, pos) : filename; } } diff --git a/ml-app-deployer/src/main/java/com/marklogic/mgmt/util/ObjectMapperFactory.java b/ml-app-deployer/src/main/java/com/marklogic/mgmt/util/ObjectMapperFactory.java index 8a9bd4a79..877c36569 100644 --- a/ml-app-deployer/src/main/java/com/marklogic/mgmt/util/ObjectMapperFactory.java +++ b/ml-app-deployer/src/main/java/com/marklogic/mgmt/util/ObjectMapperFactory.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.databind.json.JsonMapper; import java.util.ArrayList; import java.util.List; @@ -49,7 +50,7 @@ private static void initializeObjectMapper() { // standardizes on. objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.KEBAB_CASE); - objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + objectMapper.setDefaultPropertyInclusion(JsonInclude.Include.NON_NULL); objectMapper.enable(SerializationFeature.INDENT_OUTPUT); objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); // This is needed at least for localname on Element instances diff --git a/ml-app-deployer/src/test/java/com/marklogic/appdeployer/AbstractAppDeployerTest.java b/ml-app-deployer/src/test/java/com/marklogic/appdeployer/AbstractAppDeployerTest.java index 6e0ec2c9c..4d47df8d5 100644 --- a/ml-app-deployer/src/test/java/com/marklogic/appdeployer/AbstractAppDeployerTest.java +++ b/ml-app-deployer/src/test/java/com/marklogic/appdeployer/AbstractAppDeployerTest.java @@ -105,7 +105,11 @@ protected void undeploySampleApp() { } protected final DatabaseClient newDatabaseClient(String databaseName) { - return DatabaseClientFactory.newClient(appConfig.getHost(), appConfig.getRestPort(), + return newDatabaseClient(databaseName, appConfig.getRestPort()); + } + + protected final DatabaseClient newDatabaseClient(String databaseName, int port) { + return DatabaseClientFactory.newClient(appConfig.getHost(), port, databaseName, new DatabaseClientFactory.DigestAuthContext(appConfig.getRestAdminUsername(), appConfig.getRestAdminPassword())); } diff --git a/ml-app-deployer/src/test/java/com/marklogic/appdeployer/command/temporal/DeployTemporalTest.java b/ml-app-deployer/src/test/java/com/marklogic/appdeployer/command/temporal/DeployTemporalTest.java index 15c35c938..629723b0d 100644 --- a/ml-app-deployer/src/test/java/com/marklogic/appdeployer/command/temporal/DeployTemporalTest.java +++ b/ml-app-deployer/src/test/java/com/marklogic/appdeployer/command/temporal/DeployTemporalTest.java @@ -5,8 +5,11 @@ import com.marklogic.appdeployer.AbstractAppDeployerTest; import com.marklogic.appdeployer.command.databases.DeployOtherDatabasesCommand; +import com.marklogic.client.DatabaseClient; +import com.marklogic.client.io.StringHandle; import com.marklogic.mgmt.resource.temporal.TemporalAxesManager; import com.marklogic.mgmt.resource.temporal.TemporalCollectionManager; +import com.marklogic.rest.util.Fragment; import com.marklogic.rest.util.ResourcesFragment; import org.junit.jupiter.api.Test; @@ -17,7 +20,7 @@ public class DeployTemporalTest extends AbstractAppDeployerTest { @Test - public void test() { + void test() { appConfig.getFirstConfigDir().setBaseDir(new File("src/test/resources/sample-app/temporal-config-with-lsqt")); initializeAppDeployer(new DeployTemporalAxesCommand(), @@ -40,5 +43,14 @@ private void verifyTemporalDocsExist(String databaseName) { ResourcesFragment collections = new TemporalCollectionManager(manageClient, databaseName).getAsXml(); assertEquals(1, collections.getResourceCount()); + + try (DatabaseClient client = newDatabaseClient(databaseName, appConfig.getAppServicesPort())) { + String xml = client.newXMLDocumentManager().read("temporal-collection.lsqt", new StringHandle()).get(); + Fragment doc = new Fragment(xml); + String value = doc.getInternalDoc().getRootElement().getAttributeValue("lsqt-period"); + assertEquals("5000", value, + "Updating LSQT properties should produce a new document in the content database containing the " + + "property values from the LSQT properties file that was deployed."); + } } } diff --git a/ml-app-deployer/src/test/java/com/marklogic/rest/util/RetryInterceptor.java b/ml-app-deployer/src/test/java/com/marklogic/rest/util/RetryInterceptor.java deleted file mode 100644 index 2a7adcf53..000000000 --- a/ml-app-deployer/src/test/java/com/marklogic/rest/util/RetryInterceptor.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2015-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved. - */ -package com.marklogic.rest.util; - -import com.marklogic.client.ext.helper.LoggingObject; -import okhttp3.Interceptor; -import okhttp3.Request; -import okhttp3.Response; - -import java.io.IOException; -import java.net.ConnectException; -import java.net.SocketTimeoutException; -import java.net.UnknownHostException; - -/** - * OkHttp interceptor that retries requests on certain connection failures, - * which can be helpful when MarkLogic is temporarily unavailable during restarts. - */ -class RetryInterceptor extends LoggingObject implements Interceptor { - - private final int maxRetries; - private final long initialDelayMs; - private final double backoffMultiplier; - private final long maxDelayMs; - - RetryInterceptor(int maxRetries, long initialDelayMs, double backoffMultiplier, long maxDelayMs) { - this.maxRetries = maxRetries; - this.initialDelayMs = initialDelayMs; - this.backoffMultiplier = backoffMultiplier; - this.maxDelayMs = maxDelayMs; - } - - @Override - public Response intercept(Chain chain) throws IOException { - Request request = chain.request(); - IOException lastException = null; - - for (int attempt = 0; attempt <= maxRetries; attempt++) { - try { - return chain.proceed(request); - } catch (IOException e) { - lastException = e; - - if (attempt == maxRetries || !isRetryableException(e)) { - logger.warn("Not retryable: {}; {}", e.getClass(), e.getMessage()); - throw e; - } - - long delay = calculateDelay(attempt); - logger.warn("Request to {} failed (attempt {}/{}): {}. Retrying in {}ms", - request.url(), attempt + 1, maxRetries, e.getMessage(), delay); - - sleep(delay); - } - } - - throw lastException; - } - - private boolean isRetryableException(IOException e) { - return e instanceof ConnectException || - e instanceof SocketTimeoutException || - e instanceof UnknownHostException || - (e.getMessage() != null && ( - e.getMessage().contains("Failed to connect") || - e.getMessage().contains("unexpected end of stream") || - e.getMessage().contains("Connection reset") || - e.getMessage().contains("Read timed out") - )); - } - - private long calculateDelay(int attempt) { - long delay = (long) (initialDelayMs * Math.pow(backoffMultiplier, attempt)); - return Math.min(delay, maxDelayMs); - } - - private void sleep(long delay) { - try { - Thread.sleep(delay); - } catch (InterruptedException ie) { - logger.warn("Ignoring InterruptedException while sleeping for retry delay: {}", ie.getMessage()); - } - } -} diff --git a/ml-app-deployer/src/test/java/com/marklogic/rest/util/TestConfig.java b/ml-app-deployer/src/test/java/com/marklogic/rest/util/TestConfig.java index c7e086968..efc5d1435 100644 --- a/ml-app-deployer/src/test/java/com/marklogic/rest/util/TestConfig.java +++ b/ml-app-deployer/src/test/java/com/marklogic/rest/util/TestConfig.java @@ -3,6 +3,7 @@ */ package com.marklogic.rest.util; +import com.marklogic.client.impl.okhttp.RetryIOExceptionInterceptor; import com.marklogic.mgmt.DefaultManageConfigFactory; import com.marklogic.mgmt.ManageConfig; import com.marklogic.mgmt.admin.AdminConfig; @@ -75,7 +76,7 @@ public ManageConfig manageConfig() { config.setCleanJsonPayloads(true); config.setClientConfigurator(builder -> - builder.addInterceptor(new com.marklogic.rest.util.RetryInterceptor(3, 1000, 2, 5000))); + builder.addInterceptor(new RetryIOExceptionInterceptor(3, 1000, 2, 5000))); return config; } diff --git a/ml-app-deployer/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.json b/ml-app-deployer/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.json deleted file mode 100644 index cee8ec392..000000000 --- a/ml-app-deployer/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "lsqt-enabled": true, - "automation": { - "enabled": true, - "period": 5000 - } -} diff --git a/ml-app-deployer/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.xml b/ml-app-deployer/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.xml new file mode 100644 index 000000000..752d3308e --- /dev/null +++ b/ml-app-deployer/src/test/resources/sample-app/temporal-config-with-lsqt/databases/other-sample-app-content/temporal/collections/lsqt/temporal-collection.xml @@ -0,0 +1,8 @@ + + true + + true + 5000 + 1000 + + diff --git a/ml-gradle/build.gradle b/ml-gradle/build.gradle index 34be59f7b..ba1b581f9 100644 --- a/ml-gradle/build.gradle +++ b/ml-gradle/build.gradle @@ -11,7 +11,8 @@ dependencies { // For tasks that need to fiddle with the filesystem. implementation "commons-io:commons-io:2.20.0" - // For UnitTestTask. + // For UnitTestTask. Compiling against 1.5.0 until 2.0.0 is released. But this does not + // impact users, who must provide their own version of this library in order to use the task. compileOnly ("com.marklogic:marklogic-unit-test-client:1.5.0") { // Prefer the Java Client version coming from ml-javaclient-util. exclude module: "marklogic-client-api" diff --git a/ml-gradle/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy b/ml-gradle/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy index 39e40021f..c816353b4 100644 --- a/ml-gradle/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy +++ b/ml-gradle/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy @@ -46,7 +46,7 @@ class NewProjectTask extends MarkLogicTask { if (ant.mlPropertiesPlugin == "y") { def text = 'plugins {' + '\n id "net.saliman.properties" version "1.5.2"' + - '\n id "com.marklogic.ml-gradle" version "6.0.0"' + + '\n id "com.marklogic.ml-gradle" version "6.1.0"' + '\n}' println "Updating build.gradle so that the Gradle properties plugin can be applied" writeFile("build.gradle", text) diff --git a/ml-gradle/src/main/groovy/com/marklogic/gradle/task/client/CopySearchOptionsTask.groovy b/ml-gradle/src/main/groovy/com/marklogic/gradle/task/client/CopySearchOptionsTask.groovy index aea84577c..4ca3640c8 100644 --- a/ml-gradle/src/main/groovy/com/marklogic/gradle/task/client/CopySearchOptionsTask.groovy +++ b/ml-gradle/src/main/groovy/com/marklogic/gradle/task/client/CopySearchOptionsTask.groovy @@ -19,8 +19,15 @@ class CopySearchOptionsTask extends MarkLogicTask { @Optional DatabaseClient client + // Deprecated as it conflicts with the "group" property on a custom task definition. @Input - String group = "Default" + @Optional + @Deprecated(since = "6.1.0", forRemoval = true) + String group + + @Input + @Optional + String groupName = "Default" @Input String sourceServer @@ -40,8 +47,14 @@ class CopySearchOptionsTask extends MarkLogicTask { databaseClient = getAppConfig().newModulesDatabaseClient() } - def script = "declareUpdate();\nconst uri = '/${group}/${sourceServer}/rest-api/options/${optionsFilename}';\n" - script += "xdmp.documentInsert('/${group}/${targetServer}/rest-api/options/${optionsFilename}', cts.doc(uri), " + + def groupToUse = groupName + if (group != null) { + logger.warn("\nThe 'group' property is deprecated on the CopySearchOptionsTask task; use 'groupName' instead.\n") + groupToUse = group + } + + def script = "declareUpdate();\nconst uri = '/${groupToUse}/${sourceServer}/rest-api/options/${optionsFilename}';\n" + script += "xdmp.documentInsert('/${groupToUse}/${targetServer}/rest-api/options/${optionsFilename}', cts.doc(uri), " + "xdmp.documentGetPermissions(uri), xdmp.documentGetCollections(uri))"; println "Copying search options via:\n" + script databaseClient.newServerEval().javascript(script).eval() diff --git a/ml-javaclient-util/build.gradle b/ml-javaclient-util/build.gradle index 3d157616d..b02c69f82 100644 --- a/ml-javaclient-util/build.gradle +++ b/ml-javaclient-util/build.gradle @@ -1,5 +1,5 @@ dependencies { - api 'com.marklogic:marklogic-client-api:7.2.0' + api 'com.marklogic:marklogic-client-api:8.0.0' api 'com.marklogic:marklogic-xcc:12.0.0' // API dependency as some Spring classes, like Resource, are used throughout this project. @@ -11,6 +11,9 @@ dependencies { implementation 'org.jdom:jdom2:2.0.6.1' implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonVersion}" + // For compiling JAXB code; marklogic-client-api brings this in at runtime. + testCompileOnly "jakarta.xml.bind:jakarta.xml.bind-api:4.0.4" + testImplementation 'org.mockito:mockito-core:4.11.0' // Used for testing loading modules from the classpath testImplementation files("lib/modules.jar")