diff --git a/README.md b/README.md index 456097e70..ff1a73398 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ First, [install Gradle](https://gradle.org/install/). Then, in an empty directory, create a file named "build.gradle" with your favorite text editor and enter the following: - plugins { id "com.marklogic.ml-gradle" version "4.6.0" } + plugins { id "com.marklogic.ml-gradle" version "4.6.1" } Then run: diff --git a/build.gradle b/build.gradle index 5d9bf68db..da17deaba 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ plugins { } group = "com.marklogic" -version = "4.6.0" +version = "4.6.1" java { sourceCompatibility = 1.8 @@ -32,7 +32,7 @@ dependencies { implementation gradleApi() implementation localGroovy() - api 'com.marklogic:ml-app-deployer:4.6.0' + api 'com.marklogic:ml-app-deployer:4.6.1' implementation "com.marklogic:mlcp-util:1.0.1" implementation "com.marklogic:marklogic-data-movement-components:2.7.0" implementation "commons-io:commons-io:2.11.0" diff --git a/examples/alert-project/build.gradle b/examples/alert-project/build.gradle index 385b87418..913c44875 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } repositories { diff --git a/examples/corb2-project/build.gradle b/examples/corb2-project/build.gradle index b124680fd..8e668aa9a 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } repositories { diff --git a/examples/cpf-project/build.gradle b/examples/cpf-project/build.gradle index 5b9ac8fac..9feaa8e5b 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } repositories { diff --git a/examples/custom-forests-and-replicas-project/build.gradle b/examples/custom-forests-and-replicas-project/build.gradle index 953ee2e2e..219134fba 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/custom-rest-rewriter-project/build.gradle b/examples/custom-rest-rewriter-project/build.gradle index 9379ef6ff..6a3eba3f7 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } task generateCustomRewriterModules { diff --git a/examples/data-services/build.gradle b/examples/data-services/build.gradle index 6d0f60500..b7b681334 100644 --- a/examples/data-services/build.gradle +++ b/examples/data-services/build.gradle @@ -1,7 +1,7 @@ plugins { id "java" id "net.saliman.properties" version "1.5.1" - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" id 'com.marklogic.ml-development-tools' version '6.0.0' } diff --git a/examples/dependency-project/README.md b/examples/dependency-project/README.md index 215a7be26..4c41a2859 100644 --- a/examples/dependency-project/README.md +++ b/examples/dependency-project/README.md @@ -1,19 +1,16 @@ This set of projects demonstrates: -- How a "provider" project can publish a zip of MarkLogic files (modules, data, schemas, or system plugins) -- How an ml-gradle or DHF project can depend on this zip so that the files are automatically included -in an application +- How a "provider" project can publish a zip of MarkLogic files (modules, data, schemas, or system plugins). +- How an ml-gradle project can depend on this zip so that the files are automatically included in an application. ## Publishing the provider -To try this out, you'll first need Gradle installed locally. - -Then, begin by publishing the zip from the provider project: +To try this out, begin by publishing the zip from the provider project: cd provider-project - gradle publishToMavenLocal + ../../gradlew publishToMavenLocal -If you'd like to inspect the zip, you'll find it at ~/.m2/repository/com/marklogic/example-dependency. +If you'd like to inspect the zip, you'll find it at `~/.m2/repository/com/marklogic/example-dependency`. ## Deploying and verifying the ml-gradle project @@ -21,7 +18,7 @@ Next, deploy the app in the ml-gradle-client-project, replacing "changeme" below (or using a different admin-like user): cd ../ml-gradle-client-project - gradle -i mlDeploy -PmlUsername=admin -PmlPassword=change + ../../gradlew -i mlDeploy -PmlUsername=admin -PmlPassword=change You'll see logging like this that lets you know that the modules and data from the example-dependency zip will be included when the application is deployed: @@ -32,7 +29,6 @@ Found mlBundle configuration, will extract all of its dependencies to build/mlBu Finished extracting mlBundle dependencies Module paths including mlBundle paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-modules, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-modules] Data paths including mlBundle paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-data, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-data] -Plugin paths including mlBundle paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-plugins, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-plugins] Schema paths including mlBundle paths: [/Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/build/mlBundle/example-dependency/ml-schemas, /Users/rrudin/dev/workspace/ml-gradle/examples/dependency-project/ml-gradle-client-project/src/main/ml-schemas] :mlPrepareBundles (Thread[Task worker for ':',5,main]) completed. Took 0.059 secs. ``` @@ -60,16 +56,6 @@ Shutting down ExecutorService Writing 2 documents to MarkLogic; port: 8030 ``` -And also some logging like this that indicates that a system plugin was installed: - -``` -Writing plugin zip file to URI: /com.marklogic/plugins/varianceplugin.zip -Writing content for /com.marklogic/plugins/varianceplugin.zip -Installing plugin with scope 'native' from URI: /com.marklogic/plugins/varianceplugin.zip -Installed plugin with scope 'native', result: 1 -Finished executing command [com.marklogic.appdeployer.command.plugins.InstallPluginsCommand] -``` - And finally, some logging like this that indicates that schemas were loaded: ``` @@ -86,47 +72,15 @@ Writing 1 documents to MarkLogic; port: 8000; database: ml-gradle-client-schemas You can then use qconsole to verify that the following documents were inserted: -- In ml-gradle-client-modules: /example.sjs (in addition to the modules included by this project: /my-lib.xqy and /Default/ml-gradle-client/rest-api/properties.xml) -- In ml-gradle-client-schemas: /tde/template1.json (in addition to the schema file included in this project: /tde/my-template.json) -- In ml-gradle-client-content: /example/data1.json and /example/data2.json (in addition to the data files including -in this project: /testdata/test1.json, /testdata/test2.json, and /testdata/test3.json) -- In Extensions: /native/scope.xml, /native/varianceplugin/libvarianceplugin.dylib, and /native/varianceplugin/manifest.xml - -Note that ml-gradle-client-content also contains the plugin zip file at /com.marklogic/plugins/varianceplugin.zip . If -you don't want that to remain, you can use a custom Gradle task to delete it after the deployment, or use the -mlPluginDatabaseName property to store the zip file in a different database. - -You can also verify that the plugin was installed correctly by running the following task: - - gradle testPlugin - -Which should return: - -``` -> Task :testPlugin -66.6666666666667 -``` +- In ml-gradle-client-modules: `/example.sjs` (in addition to the modules included by this project: `/my-lib.xqy` and `/Default/ml-gradle-client/rest-api/properties.xml`). +- In ml-gradle-client-schemas: `/tde/template1.json` (in addition to the schema file included in this project: `/tde/my-template.json`). +- In ml-gradle-client-content: `/example/data1.json` and `/example/data2.json` (in addition to the data files including +in this project: `/testdata/test1.json`, `/testdata/test2.json`, and `/testdata/test3.json`). See [Loading data](https://github.com/marklogic/ml-app-deployer/wiki/Loading-data) for more information on configuring how data is loaded during a deployment. +## Provider project with system plugin -## Deploying and verifying the DHF project - -The DHF project is deployed the same way as the ml-gradle project, though you'll first need to run hubInit to -initialize the project (this is to avoid adding a bunch of DHF files to version control that aren't needed for -the purposes of this example): - - cd ../dhf-client-project - gradle -i mlDeploy - -You'll see the same logging as shown above for the ml-gradle project. And likewise, you can use qconsole -to verify that the following documents were inserted: - -- In dhf-client-MODULES: /example.sjs -- In dhf-client-FINAL: /example/data1.json, /example/data2.json - -Note that in a DHF project, the final database is equivalent to the default content database in an ml-gradle -project. Thus, data is loaded by default to the final database. This can be overridden via the -mlDataDatabaseName property. - +The `./provider-with-plugin-project` directory is included as a reference for including a MarkLogic system plugin +in a bundle. Building this plugin requires a C++ compiler, so it is not included in `./provider-project`. diff --git a/examples/dependency-project/dhf-client-project/.gitignore b/examples/dependency-project/dhf-client-project/.gitignore deleted file mode 100644 index 3c5229194..000000000 --- a/examples/dependency-project/dhf-client-project/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -src/main/hub-internal-config -src/main/ml-config -gradle -.gradle -build -plugins -gradlew -gradlew.bat diff --git a/examples/dependency-project/dhf-client-project/build.gradle b/examples/dependency-project/dhf-client-project/build.gradle deleted file mode 100644 index 49e81496a..000000000 --- a/examples/dependency-project/dhf-client-project/build.gradle +++ /dev/null @@ -1,30 +0,0 @@ -buildscript { - repositories { - maven { - url "http://plugins.gradle.org/m2/" - } - } - dependencies { - classpath "gradle.plugin.com.marklogic:ml-gradle:3.14.0" - classpath "gradle.plugin.com.marklogic:ml-data-hub:4.2.2" - } -} - -plugins { - id 'net.saliman.properties' version '1.5.1' -} - -apply plugin: "com.marklogic.ml-data-hub" - -repositories { - mavenLocal() -} - -dependencies { - mlBundle "com.marklogic:example-dependency:1.0.0" -} - -task testPlugin(type: com.marklogic.gradle.task.ServerEvalTask) { - description = "Run this to verify that the plugin from the example-dependency bundle was installed correctly; should get 66.67 as a result" - javascript = "cts.aggregate('native/varianceplugin', 'variance', cts.elementReference(xs.QName('amount')))" -} diff --git a/examples/dependency-project/dhf-client-project/gradle.properties b/examples/dependency-project/dhf-client-project/gradle.properties deleted file mode 100644 index 2ee6c399c..000000000 --- a/examples/dependency-project/dhf-client-project/gradle.properties +++ /dev/null @@ -1,53 +0,0 @@ -mlDHFVersion=4.2.2 -mlHost=localhost - -# Define these in gradle-local.properties -mlUsername= -mlPassword= - -mlStagingAppserverName=dhf-client-STAGING -mlStagingPort=8035 -mlStagingDbName=dhf-client-STAGING -mlStagingForestsPerHost=1 -mlStagingAuth=digest - -mlFinalAppserverName=dhf-client-FINAL -mlFinalPort=8036 -mlFinalDbName=dhf-client-FINAL -mlFinalForestsPerHost=1 -mlFinalAuth=digest - -mlJobAppserverName=dhf-client-JOBS -mlJobPort=8037 -mlJobDbName=dhf-client-JOBS -mlJobForestsPerHost=4 -mlJobAuth=digest - -mlModulesDbName=dhf-client-MODULES -mlModulesForestsPerHost=1 - -mlStagingTriggersDbName=dhf-client-staging-TRIGGERS -mlStagingTriggersForestsPerHost=1 - -mlStagingSchemasDbName=dhf-client-staging-SCHEMAS -mlStagingSchemasForestsPerHost=1 - -mlFinalTriggersDbName=dhf-client-final-TRIGGERS -mlFinalTriggersForestsPerHost=1 - -mlFinalSchemasDbName=dhf-client-final-SCHEMAS -mlFinalSchemasForestsPerHost=1 - -# The name of the Role to create for Hub Access -mlHubUserRole=dhf-client-role -mlHubUserName=dhf-client-user -# this password is autogenerated for you via the 'gradle hubInit' task -mlHubUserPassword=RiWi{UE-yXLfK'TIo4Z( - -# The name of the role to create for hub deployment/development -mlHubAdminRole=hub-admin-role -mlHubAdminUserName=hub-admin-user -mlHubAdminUserPassword=koq$Qd$5Ex$:3grhHX#6 - -# Default module permissions which allow dhf-client-role to execute flows -mlModulePermissions=rest-reader,read,rest-writer,insert,rest-writer,update,rest-extension-user,execute,dhf-client-role,read,dhf-client-role,execute diff --git a/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test1.json b/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test1.json deleted file mode 100644 index df29c446d..000000000 --- a/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test1.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "amount": 10 -} diff --git a/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test2.json b/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test2.json deleted file mode 100644 index 876a7b690..000000000 --- a/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test2.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "amount": 20 -} diff --git a/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test3.json b/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test3.json deleted file mode 100644 index c2dcde801..000000000 --- a/examples/dependency-project/dhf-client-project/src/main/ml-data/testdata/test3.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "amount": 30 -} diff --git a/examples/dependency-project/dhf-client-project/src/main/ml-modules/root/my-lib.xqy b/examples/dependency-project/dhf-client-project/src/main/ml-modules/root/my-lib.xqy deleted file mode 100644 index 24110d927..000000000 --- a/examples/dependency-project/dhf-client-project/src/main/ml-modules/root/my-lib.xqy +++ /dev/null @@ -1 +0,0 @@ - diff --git a/examples/dependency-project/dhf-client-project/src/main/ml-schemas/tde/my-template.json b/examples/dependency-project/dhf-client-project/src/main/ml-schemas/tde/my-template.json deleted file mode 100644 index 8a5bb0174..000000000 --- a/examples/dependency-project/dhf-client-project/src/main/ml-schemas/tde/my-template.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "template": { - "context": "/data", - "collections": [ - "data" - ], - "rows": [ - { - "schemaName": "Data", - "viewName": "default", - "columns": [ - { - "name": "Id", - "scalarType": "string", - "val": "Id" - } - ] - } - ] - } -} diff --git a/examples/dependency-project/ml-gradle-client-project/build.gradle b/examples/dependency-project/ml-gradle-client-project/build.gradle index 77e7a1a58..fcd832700 100644 --- a/examples/dependency-project/ml-gradle-client-project/build.gradle +++ b/examples/dependency-project/ml-gradle-client-project/build.gradle @@ -1,20 +1,8 @@ -//buildscript { -// repositories { -// mavenCentral() -// mavenLocal() -// } -// dependencies { -// classpath "com.marklogic:ml-gradle:4.2.0" -// } -//} - plugins { id "net.saliman.properties" version "1.5.1" - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } -//apply plugin: "com.marklogic.ml-gradle" - repositories { mavenLocal() } @@ -22,8 +10,3 @@ repositories { dependencies { mlBundle "com.marklogic:example-dependency:1.0.0" } - -task testPlugin(type: com.marklogic.gradle.task.ServerEvalTask) { - description = "Run this to verify that the plugin from the example-dependency bundle was installed correctly; should get 66.67 as a result" - javascript = "cts.aggregate('native/varianceplugin', 'variance', cts.elementReference(xs.QName('amount')))" -} diff --git a/examples/dependency-project/ml-gradle-client-project/gradle.properties b/examples/dependency-project/ml-gradle-client-project/gradle.properties index a3d197ee7..de3f11857 100644 --- a/examples/dependency-project/ml-gradle-client-project/gradle.properties +++ b/examples/dependency-project/ml-gradle-client-project/gradle.properties @@ -1,5 +1,5 @@ mlAppName=ml-gradle-client -mlRestPort=8030 +mlRestPort=8037 mlContentForestsPerHost=2 # Define these in gradle-local.properties diff --git a/examples/dependency-project/provider-project/build.gradle b/examples/dependency-project/provider-project/build.gradle index e5bbd8f73..80526afba 100644 --- a/examples/dependency-project/provider-project/build.gradle +++ b/examples/dependency-project/provider-project/build.gradle @@ -19,9 +19,6 @@ task bundleJar(type: Jar) { from("src/main/ml-data") { into("example-dependency/ml-data") } - from("src/main/ml-plugins") { - into("example-dependency/ml-plugins") - } from("src/main/ml-schemas") { into("example-dependency/ml-schemas") } diff --git a/examples/dependency-project/provider-with-plugin-project/build.gradle b/examples/dependency-project/provider-with-plugin-project/build.gradle new file mode 100644 index 000000000..821374e4e --- /dev/null +++ b/examples/dependency-project/provider-with-plugin-project/build.gradle @@ -0,0 +1,31 @@ +plugins { + id "maven-publish" +} + +group = "com.marklogic" +version = "1.0.0" + +configurations { + bundle +} + +task bundleJar(type: Jar) { + from("src/main/ml-plugins") { + into("example-dependency/ml-plugins") + } + destinationDirectory = file("build/libs") + archiveBaseName = "example-dependency-with-plugin" +} + +artifacts { + bundle bundleJar +} + +publishing { + publications { + mainBundle(MavenPublication) { + artifactId "example-dependency-with-plugin" + artifact bundleJar + } + } +} diff --git a/examples/dependency-project/provider-project/src/main/ml-plugins/variance/.gitignore b/examples/dependency-project/provider-with-plugin-project/src/main/ml-plugins/variance/.gitignore similarity index 100% rename from examples/dependency-project/provider-project/src/main/ml-plugins/variance/.gitignore rename to examples/dependency-project/provider-with-plugin-project/src/main/ml-plugins/variance/.gitignore diff --git a/examples/dependency-project/provider-project/src/main/ml-plugins/variance/Makefile b/examples/dependency-project/provider-with-plugin-project/src/main/ml-plugins/variance/Makefile similarity index 100% rename from examples/dependency-project/provider-project/src/main/ml-plugins/variance/Makefile rename to examples/dependency-project/provider-with-plugin-project/src/main/ml-plugins/variance/Makefile diff --git a/examples/dependency-project/provider-project/src/main/ml-plugins/variance/VariancePlugin.cpp b/examples/dependency-project/provider-with-plugin-project/src/main/ml-plugins/variance/VariancePlugin.cpp similarity index 100% rename from examples/dependency-project/provider-project/src/main/ml-plugins/variance/VariancePlugin.cpp rename to examples/dependency-project/provider-with-plugin-project/src/main/ml-plugins/variance/VariancePlugin.cpp diff --git a/examples/disconnected-project-using-plugins-and-gradlew/build.gradle b/examples/disconnected-project-using-plugins-and-gradlew/build.gradle index 6657aabb9..368ff0c9a 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.1' - id 'com.marklogic.ml-gradle' version "4.6.0" + id 'com.marklogic.ml-gradle' version "4.6.1" } repositories { diff --git a/examples/disconnected-project/gradle.properties b/examples/disconnected-project/gradle.properties index 185e59810..5acbbf506 100644 --- a/examples/disconnected-project/gradle.properties +++ b/examples/disconnected-project/gradle.properties @@ -1,4 +1,4 @@ -mlGradleDependency=com.marklogic:ml-gradle:4.6.0 +mlGradleDependency=com.marklogic:ml-gradle:4.6.1 mlSalimanDependency=net.saliman:gradle-properties-plugin:1.4.6 mlHost=localhost diff --git a/examples/docker-projects/single-node-with-nifi/build.gradle b/examples/docker-projects/single-node-with-nifi/build.gradle index dde8d3895..a5adcdaa2 100644 --- a/examples/docker-projects/single-node-with-nifi/build.gradle +++ b/examples/docker-projects/single-node-with-nifi/build.gradle @@ -1,7 +1,7 @@ plugins { // gradle -PenvironmentName=x ... id 'net.saliman.properties' version '1.5.1' - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" id 'com.avast.gradle.docker-compose' version "0.6.11" } dockerCompose { diff --git a/examples/docker-projects/single-node/build.gradle b/examples/docker-projects/single-node/build.gradle index d22dff8a9..ccec255a5 100644 --- a/examples/docker-projects/single-node/build.gradle +++ b/examples/docker-projects/single-node/build.gradle @@ -1,7 +1,7 @@ plugins { // gradle -PenvironmentName=x ... id 'net.saliman.properties' version '1.5.1' - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" id 'com.avast.gradle.docker-compose' version "0.6.11" } dockerCompose { diff --git a/examples/docker-projects/three-node-cluster-with-ha-proxy/build.gradle b/examples/docker-projects/three-node-cluster-with-ha-proxy/build.gradle index c6e1d77ac..da57a6ed4 100644 --- a/examples/docker-projects/three-node-cluster-with-ha-proxy/build.gradle +++ b/examples/docker-projects/three-node-cluster-with-ha-proxy/build.gradle @@ -1,6 +1,6 @@ plugins { id 'net.saliman.properties' version '1.5.1' - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" id 'com.avast.gradle.docker-compose' version "0.6.11" } dockerCompose { diff --git a/examples/entity-services-project/build.gradle b/examples/entity-services-project/build.gradle index 953ee2e2e..219134fba 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/external-security/build.gradle b/examples/external-security/build.gradle index 953ee2e2e..219134fba 100644 --- a/examples/external-security/build.gradle +++ b/examples/external-security/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/failover-project/build.gradle b/examples/failover-project/build.gradle index 953ee2e2e..219134fba 100644 --- a/examples/failover-project/build.gradle +++ b/examples/failover-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/flexrep-project/build.gradle b/examples/flexrep-project/build.gradle index 92b33b1d6..9f5009032 100644 --- a/examples/flexrep-project/build.gradle +++ b/examples/flexrep-project/build.gradle @@ -11,7 +11,7 @@ */ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } ext { diff --git a/examples/flexrep-with-path-project/build.gradle b/examples/flexrep-with-path-project/build.gradle index 7cc762106..d3656a1ca 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:4.6.0" + classpath "com.marklogic:ml-gradle:4.6.1" } } diff --git a/examples/httpbuilder-project/build.gradle b/examples/httpbuilder-project/build.gradle index 44713db45..e6b8d1e31 100644 --- a/examples/httpbuilder-project/build.gradle +++ b/examples/httpbuilder-project/build.gradle @@ -5,7 +5,7 @@ buildscript { } plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } /* diff --git a/examples/ignore-resources-project/build.gradle b/examples/ignore-resources-project/build.gradle index 3371ce547..acd81784e 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } ext { diff --git a/examples/jdbc-project/build.gradle b/examples/jdbc-project/build.gradle index c24f0bc5e..416593a9a 100644 --- a/examples/jdbc-project/build.gradle +++ b/examples/jdbc-project/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" id "java" } diff --git a/examples/local-testing-project/gradle.properties b/examples/local-testing-project/gradle.properties index 9cf3099c4..23ac7cb9e 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=4.6.0 +mlGradleVersion=4.6.1 mlHost=localhost mlAppName=example diff --git a/examples/marklogic-cloud-project/gradle.properties b/examples/marklogic-cloud-project/gradle.properties index f1f833cea..93ee7211c 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=4.6.0 +mlGradleVersion=4.6.1 mlAppName=cloud-test diff --git a/examples/maven-project/build.gradle b/examples/maven-project/build.gradle index 953ee2e2e..219134fba 100644 --- a/examples/maven-project/build.gradle +++ b/examples/maven-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/mimetypes-project/build.gradle b/examples/mimetypes-project/build.gradle index 709676acc..7ec138880 100644 --- a/examples/mimetypes-project/build.gradle +++ b/examples/mimetypes-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/minimal-project/build.gradle b/examples/minimal-project/build.gradle index 8e1dc85e4..cc9233ce9 100644 --- a/examples/minimal-project/build.gradle +++ b/examples/minimal-project/build.gradle @@ -7,5 +7,5 @@ */ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/mlcp-project/build.gradle b/examples/mlcp-project/build.gradle index fe93d33c1..6dc0d55ec 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:4.6.0" + classpath "com.marklogic:ml-gradle:4.6.1" } } @@ -24,12 +24,19 @@ repositories { } +// For MLCP 11.1.0 and higher, Gradle needs to be told which version of the guava dependency to use. +// Per https://stackoverflow.com/questions/76897459/how-can-i-make-gradle-pick-the-right-guava-variant/77399208#77399208, +// the following will achieve that. configurations { - mlcp + mlcp { + attributes { + attribute(TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(TargetJvmEnvironment.class, TargetJvmEnvironment.STANDARD_JVM)) + } + } } dependencies { - mlcp 'com.marklogic:mlcp:10.0.9.5' + mlcp 'com.marklogic:mlcp:11.1.0' /** * 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 709676acc..7ec138880 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/partition-project/gradle.properties b/examples/partition-project/gradle.properties index 3b1c3c6fd..442afdbcf 100644 --- a/examples/partition-project/gradle.properties +++ b/examples/partition-project/gradle.properties @@ -1,4 +1,4 @@ -mlGradleVersion=4.6.0 +mlGradleVersion=4.6.1 mlHost=localhost mlAppName=partition-example diff --git a/examples/properties-project/build.gradle b/examples/properties-project/build.gradle index be8445ca5..c86b4410b 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.4.6" - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } task printHost { diff --git a/examples/qbv-example/build.gradle b/examples/qbv-example/build.gradle index a4a2a04da..596dc7543 100644 --- a/examples/qbv-example/build.gradle +++ b/examples/qbv-example/build.gradle @@ -1,5 +1,5 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } repositories { diff --git a/examples/redaction-ruleset-project/build.gradle b/examples/redaction-ruleset-project/build.gradle index d2dd36ea0..94efee0d9 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } repositories { diff --git a/examples/role-project/build.gradle b/examples/role-project/build.gradle index 953ee2e2e..219134fba 100644 --- a/examples/role-project/build.gradle +++ b/examples/role-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/roxy-project/build.gradle b/examples/roxy-project/build.gradle index bb79e0493..0a0a288f6 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:4.6.0" + classpath "com.marklogic:ml-gradle:4.6.1" } } diff --git a/examples/sample-project/build.gradle b/examples/sample-project/build.gradle index 3769b55f5..73a8f19a4 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:4.6.0" + classpath "com.marklogic:ml-gradle:4.6.1" } } diff --git a/examples/schemas-project/build.gradle b/examples/schemas-project/build.gradle index 953ee2e2e..219134fba 100644 --- a/examples/schemas-project/build.gradle +++ b/examples/schemas-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/ssl-2way-project/build.gradle b/examples/ssl-2way-project/build.gradle index 094ce67bd..87ad9565b 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.1" - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/ssl-project/build.gradle b/examples/ssl-project/build.gradle index 8526fed93..40c896dbc 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.1" - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } /* diff --git a/examples/temporal-lsqt-project/build.gradle b/examples/temporal-lsqt-project/build.gradle index 953ee2e2e..219134fba 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/temporal-project/build.gradle b/examples/temporal-project/build.gradle index 953ee2e2e..219134fba 100644 --- a/examples/temporal-project/build.gradle +++ b/examples/temporal-project/build.gradle @@ -1,3 +1,3 @@ plugins { - id "com.marklogic.ml-gradle" version "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/triggers-project/build.gradle b/examples/triggers-project/build.gradle index 8d603a628..004341796 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:4.6.0" + classpath "com.marklogic:ml-gradle:4.6.1" } } diff --git a/examples/uni-temporal-project/build.gradle b/examples/uni-temporal-project/build.gradle index 709676acc..7ec138880 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } diff --git a/examples/use-modulesdb-project/build.gradle b/examples/use-modulesdb-project/build.gradle index daec9bed3..075a50f9e 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 "4.6.0" + id "com.marklogic.ml-gradle" version "4.6.1" } ext { diff --git a/pom.xml b/pom.xml index 272616e9f..ad7dc60ff 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ It is not intended to be used to build this project. 4.0.0 com.marklogic ml-gradle - 4.6.0 + 4.6.1 com.marklogic:ml-gradle Gradle plugin for automating everything involving MarkLogic https://github.com/marklogic/ml-gradle @@ -40,7 +40,7 @@ It is not intended to be used to build this project. com.marklogic ml-app-deployer - 4.6.0 + 4.6.1 compile diff --git a/src/main/groovy/com/marklogic/gradle/task/DeleteModuleTimestampsFileTask.groovy b/src/main/groovy/com/marklogic/gradle/task/DeleteModuleTimestampsFileTask.groovy index 7bbd718aa..7e4a606bf 100644 --- a/src/main/groovy/com/marklogic/gradle/task/DeleteModuleTimestampsFileTask.groovy +++ b/src/main/groovy/com/marklogic/gradle/task/DeleteModuleTimestampsFileTask.groovy @@ -28,12 +28,16 @@ class DeleteModuleTimestampsFileTask extends MarkLogicTask { @TaskAction void deleteFile() { filePath = getAppConfig().getModuleTimestampsPath() - File f = new File(filePath) - if (f.exists()) { - println "Deleting " + f.getAbsolutePath() + "\n" - f.delete() - } else { - println "Module timestamps file " + filePath + " does not exist, so not deleting" - } + if (filePath != null && filePath.trim().length() > 0) { + File f = new File(filePath) + if (f.exists()) { + println "Deleting " + f.getAbsolutePath() + "\n" + f.delete() + } else { + println "Module timestamps file " + filePath + " does not exist, so not deleting" + } + } else { + println "Module timestamps file path is not set, so not attempting to delete" + } } } diff --git a/src/main/groovy/com/marklogic/gradle/task/DeployToReplicaTask.groovy b/src/main/groovy/com/marklogic/gradle/task/DeployToReplicaTask.groovy index ccc0d6fb9..3cbccc6ca 100644 --- a/src/main/groovy/com/marklogic/gradle/task/DeployToReplicaTask.groovy +++ b/src/main/groovy/com/marklogic/gradle/task/DeployToReplicaTask.groovy @@ -39,6 +39,6 @@ class DeployToReplicaTask extends MarkLogicTask { commandListSupplier.get() : new CommandMapBuilder().getCommandsForReplicaCluster() - new SimpleAppDeployer(commands).deploy(getAppConfig()) + newAppDeployer(commands).deploy(getAppConfig()) } } diff --git a/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy b/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy index 16eb82544..c4b006b9a 100644 --- a/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy +++ b/src/main/groovy/com/marklogic/gradle/task/NewProjectTask.groovy @@ -58,7 +58,7 @@ class NewProjectTask extends MarkLogicTask { if (ant.mlPropertiesPlugin == "y") { def text = 'plugins {' + '\n id "net.saliman.properties" version "1.5.1"' + - '\n id "com.marklogic.ml-gradle" version "4.6.0"' + + '\n id "com.marklogic.ml-gradle" version "4.6.1"' + '\n}' println "Updating build.gradle so that the Gradle properties plugin can be applied" writeFile("build.gradle", text)