Skip to content
rjrudin edited this page Feb 5, 2018 · 31 revisions

As a Gradle plugin, ml-gradle contributes dozens of MarkLogic-specific tasks to a Gradle project. These tasks can always be viewed by running the standard Gradle tasks command:

gradle tasks

This will list all the tasks in your Gradle project, which includes tasks contributed by other Gradle plugins. ml-gradle organizes the tasks it contributes into task groups, each beginning with "ml-gradle". And each task provides a description of how it should be used.

The purpose of this page then is to list every task in the latest version of ml-gradle, and, when appropriate, provide additional documentation beyond what's displayed via "gradle tasks". When a new task is added by an ml-gradle release, it will be listed here as well, similar to how the Property reference is updated with each new release.

Deploy

  • mlDeploy = Deploys the application defined by the project.
  • mlPostDeploy = An "empty" Gradle task that exists solely so that project-specific tasks can be associated with it via "dependsOn". For example, you may have a "myImportData" task that uses MLCP to import data, and you need to run it after an application is deployed. Just add "mlPostDeploy.dependsOn myImportData" to your build.gradle file.
  • mlPostUndeploy = Just like mlPostDeploy, but for post-processing after an application is undeployed.
  • mlRedeploy = Just like mlDeploy, but first runs mlClearModulesDatabase. This ensures that any modules e.g. removed from version control will be removed from the modules database as well.
  • mlUndeploy

Admin

  • mlInit
  • mlInstallAdmin

Alerting

  • mlDeleteAllAlertConfigs = Useful for wiping out all alerting data from a content database.
  • mlDeployAlerting

Cluster

  • mlAddHost
  • mlModifyCluster
  • mlDisableSslFips
  • mlEnableSslFips
  • mlRemoveHost
  • mlRestartCluster

CPF

  • mlDeployCpf
  • mlRedeployCpf = Useful for deploying CPF from scratch. Be aware that this first clears the triggers database, which may contain triggers that are not related to CPF and would need to be deployed again.
  • mlLoadDefaultPipelines

Database

  • mlClearContentDatabase
  • mlClearDatabase
  • mlClearModulesDatabase
  • mlClearSchemasDatabase
  • mlClearTriggersDatabase
  • mlDeployDatabases
  • mlMergeContentDatabase
  • mlMergeDatabase
  • mlReindexContentDatabase
  • mlReindexDatabase
  • mlSetContentUpdatesAllowed (a task for setting this on any database doesn't exist yet)
  • mlAddCollections
  • mlAddPermissions
  • mlDeleteCollections
  • mlExportBatchesToDirectory
  • mlExportBatchesToZips
  • mlExportToFile
  • mlExportToZip
  • mlRemoveCollections
  • mlRemovePermissions
  • mlSetCollections
  • mlSetPermissions

Development

  • mlCreateResource
  • mlCreateTransform
  • mlExportResources
  • mlPrepareRestApiDependencies
  • mlPrintTokens
  • mlNewProject
  • mlScaffold
Clone this wiki locally