Skip to content

Writing a task that talks to a different port

rjrudin edited this page May 4, 2016 · 8 revisions

Writing a task that talks to the Management REST API on port 8002 is straightforward - you can write a custom task that references mlManageClient, which is an instance of ManageClient:

task example {
  doLast {
    mlManageClient.putJson("...")
  }
}

Or you can extend MarkLogicTask and access the ManageClient that way as well:

task example(type: com.marklogic.gradle.task.MarkLogicTask) {
  doLast {
    getManageClient().putJson("...")
  }
}
Clone this wiki locally