Questions tagged [ml-gradle]

Gradle plugin for automating anything you can imagine with MarkLogic

github.com/marklogic/corb2https://github.com/marklogic-community/ml-gradle

What is ml-gradle?

ml-gradle is a Gradle plugin that supports a number of tasks pertaining to deploying an application to MarkLogic and interacting with other features of MarkLogic via a Gradle build file. The bulk of the functionality provided by ml-gradle is actually in ml-app-deployer - ml-gradle is just intended to be a thin wrapper around this library, exposing its functionality via Gradle tasks and properties.

Why use ml-gradle?

ml-gradle is a good fit for you and your team if:

  1. You're using MarkLogic 8
  2. You're using Gradle, or you're considering moving away from Ant/Maven/etc to Gradle to manage all of your build processes
  3. You'd like to use a build tool that can manage the dependencies and execution of MarkLogic tools such as the Java Client API, mlcp, corb, recordloader, xqsync
  4. You'd like to have a single all-purpose tool that allows you to define tasks to do anything you need to on your MarkLogic project, including tasks that have nothing to do with MarkLogic.

If you're currently using Ant or Maven and are wondering about Gradle, there are many comparisons of these tools on the Internet; I recommend making this shift. If you are using Ant, it's easy to invoke Ant tasks from Gradle. And if you can't move away from Maven, you can try this Maven plugin for invoking Gradle.

What are the main features of ml-gradle?

  1. Utilizes the new Management REST API in MarkLogic 8 to configure and deploy all aspects of an application.
  2. Can watch for new/modified modules and automatically load them for you, thus speeding up the code/build/test cycle
  3. Can run Content Pump, Corb, and other Java-based MarkLogic tools without having to copy jars around and worry about a classpath
  4. Can treat packages of MarkLogic code as true third-party dependencies, resolving them just like you would a dependency on a jar, as well as automatically loading such code into your modules database
  5. Can take advantage of all the features of Gradle

Related tags :

85 questions
1
vote
2 answers

How to clear Module database in MarkLogic

What is the gradle task to clear all modules in a MarkLogic database? I have tried mlClearDatabase, but it didn't work.
Ramz
  • 99
  • 1
  • 6
1
vote
0 answers

How can I configure more than one REST API servers in ml-gradle?

I have to create multiple REST API servers using ml-gradle. I know I can configure at this path src/main/ml-config/rest-api.json but I am not able to figure out how can I configure it to create multiple REST API instances. One work around I know to…
Dixit Singla
  • 2,540
  • 3
  • 24
  • 39
1
vote
1 answer

Is it possible to use token replacements in DHF flow files?

On MarkLogic 10.0-3, using ml-data-hub plugin 5.2.1, I would like to specify variable source and target databases in mapping steps of flows when deploying to various environments (saliman.properties plugin 1.4.6) based on the mlAppName property,…
Shon
  • 690
  • 6
  • 22
1
vote
1 answer

How do I use XProc as a copy filter in gradle?

I have an XQuery script that I want to run against all of the files in a gradle copy task as a filter. I am looking at both XQJ and XProc. Since there is a supported implementation of Calabash in ml-gradle, I decided to go that route. Is there an…
Loren Cahlander
  • 1,257
  • 1
  • 10
  • 24
1
vote
2 answers

Passing parameters to corb uri stage using ml-gradle

I'm using ml-gradle with corb2 2.4.5 and Marklogic 9.0.5. I'm trying to pass a parameter to corb when running the gradle task. I've passed the parameter in at -DURIS-MODULE.id="sf" In my xquery module, I have declare variable $id as xs:string…
Steve Anderson
  • 334
  • 1
  • 7
1
vote
1 answer

Master forest on host-1, replicas on other remaining hosts in ml-gradle?

I have configured 5 node cluster lets say (h1, h2, h3, h4, h5) I want to create a database content with one forest content-1 on h1 and 4 replicas on h2,h3,h4,h5. Is this possible by using some ml-gradle property or I have to define custom json for…
Dixit Singla
  • 2,540
  • 3
  • 24
  • 39
1
vote
1 answer

Token replacement when deploying using Gradle

We have some environment specific configurations that we want to deploy. We're using ML 9, together with the gradle 4.8 plus: - ml-data-hub plugin 3.0.0 - ml-gradle plugin 3.6.3 - saliman properties plugin 1.4.6 I've created two resources (JSON and…
MilcoNuman
  • 11
  • 1
  • 2
1
vote
1 answer

gradle mlExportToFile failure unsupported auth scheme

I am trying to export multiple xml files out of MarkLogic and into one singular file to deliver to a downstream consumer. When running the below script... gradle mlExportToFile -PexportPath=G:\Marklogic\export_header.xml…
Hank
  • 131
  • 4
1
vote
1 answer

Export Header & Body in a single XML using gradle mlExportToFile

ML Gradle Export to File doesn't provide a way to export header and body in a single XML payload I tried to export the body using the following, gradle mlExportToFile -PwhereUriPattern=*.xml -PexportPath=c:\export\export.xml -PfileHeader=""…
haritrichy
  • 107
  • 9
1
vote
1 answer

Using node modules in MarkLogic Modules

I'm running a Marklogic server with an exposed REST API. I have extended the API with my own resources. These endpoints are just .sjs files as dictated by the documentation. Is it possible to use regular node modules (installed via npm) in these sjs…
user2183384
  • 101
  • 1
  • 10
1
vote
1 answer

Permissions on REST API options with ml-gradle

I have a DHF5 project with some custom options under src/main/ml-modules/options. I'd like to specify permissions for them, but it's not clear how to do so. The mlModulePermissions property doesn't affect their permissions, nor does setting up a…
Dave Cassel
  • 8,352
  • 20
  • 38
1
vote
0 answers

mlloaddatabases backup-enabled always true

Running "gradle mlLoadDatabases" where my database config file contains: "database-backup": [ { "backup-id": 1001, "backup-enabled": false, "backup-directory": ... The scheduled backup that gets created always has…
Paulwms
  • 95
  • 8
1
vote
1 answer

Marklogic ml-gradle not clearing the database

I have recently loaded about 30GB of data to a database. To clear the content I ran the following gradle command which succeeded but the database was not cleared. Could not find any errors in the log. gradle mlClearContentDatabase…
1
vote
1 answer

How to deploy templates to different schema databases?

I have staging and final databases, both currently sharing a schemas database. We're using TDE, where some templates apply to staging and some to final. Can ml-gradle deploy some templates to one schemas database and others to a second?
Dave Cassel
  • 8,352
  • 20
  • 38
1
vote
1 answer

How to create Appserver, schema, trigger and modules DB in every host attached to a cluster?

I am trying to configure MarkLogic instance setup in AWS. I have a cluster with 3 nodes(3 EC2 instances) attached to ELB. I want each of the host to have the same App Server, Modules , Schema and Trigger DB. How can i set it up using ml-gradle?
Manoj K J
  • 69
  • 7