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
4
votes
2 answers

Can ml-gradle deploy a query options file to an app server?

I have a MarkLogic cluster configured with DHF 5 and ml-gradle. I have multiple HTTP app servers and a couple of query options file. When I do an mlDeploy, the query options files are deployed to the final app server, but not the others. Is there a…
eaolson
  • 14,717
  • 7
  • 43
  • 58
3
votes
1 answer

how to create a FIELD in marklogic using ml-gradle?

I have create a Field in marklogic through Admin console and I want to configure the same setting through ml-gradle to avoid manually creation from Admin console. Is there any way to configure through ml-gradle?
mpuram
  • 149
  • 9
3
votes
3 answers

Dynamically setting ml-gradle properties

I need to set an ml-gradle property (mlModulesDatabaseName) within the build script itself. I was under the impression that the gradle-y way to do that was to use the extra modules extension: ext { mlModulesDatabaseName = 'Modules' } This seems…
3
votes
1 answer

How to use ml-gradle to load modules on rest server with 2-way SSL

I am trying to configure ml-gradle to load modules on an environment that is setup with 2-way SSL, but am not finding much documentation on how I should specify my Certificate in the gradle.properties . There are brief instructions at…
dan
  • 131
  • 3
3
votes
1 answer

marklogic ml-gradle configuration for super databases

I currently have a super / sub database setup and would like to know the best way to deploy a fresh install via ml-gradle 2.7.0. I have gotten it to work by removing the following file from my config directory for the first pass mlDeploy. { …
H. Garrow
  • 75
  • 4
3
votes
1 answer

mlGradle and configuring replica forests

Does anyone have any examples regarding using mlGradle to configure replica forests? I have looked at the example I could find from the mlGradle…
TJ Tang
  • 921
  • 6
  • 17
2
votes
2 answers

How do I manage MarkLogic REST endpoint extension versions using gradle?

I'm extending the REST API in MarkLogic and managing my development and deployment using gradle. By default, my endpoint looks like this (note v1): http://localhost:8005/v1/resources/my_endpoint If I change my endpoint implementation, how do I…
2
votes
2 answers

ml-gradle TDE 4.3.5

I have a problem to deploy TED in a specific database. I put them in the schemas/tde subdirectory of the database associated with my content database. All is OK with the ml-gradle version 4.3.4, but when I update to use the 4.3.5 version, I have an…
2
votes
1 answer

Fail to initialize ml gradle project (mlDeployApp) with the rest-api-server

Fail to deploy a brand new mlgradle project to Marklogic 10.0-9.2-centos-1.0.0-ea4 in docker desktop. Execution failed for task ':mlDeployApp'. > java.net.ConnectException: Failed to connect to localhost/127.0.0.1:8900 Steps to replicate the…
2
votes
1 answer

Execute a XQuery script directly from Gradle instead of from QConsole

I would like to execute a XQuery script directly from Gradle instead of from QConsole. How to do that? Is there a mlGradle task for that? Or we could define a task like running MLCP from gradle?
2
votes
1 answer

MarkLogic unit test not running any tests

I thought it would be a good idea to set up MarkLogic unit testing, so I've been following the unit-test-project as best as I can. Everything seems to work, but no unit tests are being performed. I've copied the four unit tests to…
eaolson
  • 14,717
  • 7
  • 43
  • 58
2
votes
2 answers

Unable to setup MarkLogic spring batch basic app

I'm trying to setup the sample app to load 100 docs in MarkLogic server using the spring batch git documentation but I get this error everytime I try to run my job: *** What went wrong: Execution failed for task ':runYourJob'. > Could not…
Mehul
  • 148
  • 9
2
votes
0 answers

Does ml-gradle provide any feature to deploy forest topology as per Availability zones in mind?

Is there any feature provided by "ml-gradle" wherein I can deploy replica forests topology with Availability zones in mind? Or any API by MarkLogic to know which node is in which Availability zone so that I can define my own logic for the forest…
Dixit Singla
  • 2,540
  • 3
  • 24
  • 39
2
votes
1 answer

Marklogic mlreloadmodule is throwing error after adding ml unit tests

While running mlrelaodmodules i am getting below error > Execution failed for task ':mlLoadModules'. > > Local message: failed to apply resource at documents: Bad Request. Server Message: XDMP-CONFLICTINGUPDATES: >…
Ramz
  • 99
  • 1
  • 6
2
votes
1 answer

Enable reusable gradle tasks from the ml-gradle "provider" project pattern?

Within ml-gradle, we can create a "provider" project to bundle shared MarkLogic assets (modules, schemas etc.) and use them from other dependent ml-gradle…
Fan Li
  • 1,057
  • 7
  • 11
1
2 3 4 5 6