Gradle plugin to support automating MarkLogic tasks for Grove

Usage no npm install needed!

<script type="module">
  import marklogicCommunityGroveMlGradle from 'https://cdn.skypack.dev/@marklogic-community/grove-ml-gradle';



This Grove app is meant to support configuration of MarkLogic databases, app-servers, users, roles, etc. It also supports deployment of application code, and import of content.

System requirements

The following someware must be pre-installed:

Also used, but downloaded and installed automatically:

  • MarkLogic Content Pump - MarkLogic data import tool (included via Gradle)
  • Gradle 4.8 - Build tooling for the Java ecosystem (included using gradle-wrapper)
  • ml-gradle: The actual MarkLogic configuration deploy tool (included via Gradle)

Quick Start (for the Impatient)

On Mac or Linux:

./gradlew mlDeploy
./gradlew loadSampleData

On Windows:

gradlew.bat mlDeploy
gradlew.bat loadSampleData

Setting up the target enviroment

This deployment tool has been configured to look inside gradle.properties for the default settings. Next to that, it will look for environment specific settings via the environmentName variable. Adding -PenvironmentName=dev to any gradle call will cause the tool to look for a gradle-dev.properties for overrides or extra settings. The environmentName variable defaults to local, so by default any gradle call will look for gradle-local.properties.

Note: gradle-local.properties is gitignored by default, use it for settings specific to your own development environment, like your personal laptop.

Deploy your Application

Run the following ml-gradle commands to deploy the application to the chosen MarkLogic installation. It will create and configure databases, REST servers, users, and roles for you, and deploy the back-end application code.

./gradlew mlDeploy -PenvironmentName=[local|dev|prod]

Or on Windows:

gradlew.bat mlDeploy -PenvironmentName=[local|dev|prod]

Loading Sample Data (optional)

The application comes with 3000 JSON documents generated by json-generator.com. They will allow you to explore all the features you get out of the box in a better way. You can load them with (MLCP)[https://docs.marklogic.com/guide/ingestion/content-pump] using ml-gradle.

./gradlew loadSampleData

Or on Windows:

gradlew.bat loadSampleData