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

401 unauthorized issue in "ml-gradle" > v3.4.1

Seeing a weird issue in ml-gradle. Just updated the ml-gradle to v3.16.4 and ML version to v10.0.2-1. On running the below command getting 401 unauthorized error. On changing the gradle version to 3.4.1 issue is not coming up. ./gradlew…
Dixit Singla
  • 2,540
  • 3
  • 24
  • 39
2
votes
2 answers

Setting heap size for CorbTask

In my build.gradle, I have a task of type CorbTask, where I am looking to execute some process over a large number of URIs. In this case, I am processing a little less than 800,000 URIs. task updateSharePointMetadata(type:…
TJ Tang
  • 921
  • 6
  • 17
2
votes
1 answer

How to access encrypted passwords from specific location using gradle-credentials-plugin

We are using gradle-credentials-plugin to encrypt project passwords --Add credentials: gradle addCredentials --key "InitialPassword" --value $pwdValue -PcredentialsLocation=${baseDir} --Read Passwords: project.IntialPassword =…
mpuram
  • 149
  • 9
2
votes
2 answers

Create multiple MarkLogic Schedule Task for same module through ml-gradle

I am trying to create multiple instance of application on same marklogic environment. I can able to create all the configurations(users,roles,databases,forests,app servers...) but could not able to schedule individual tasks for separate database…
mpuram
  • 149
  • 9
2
votes
2 answers

Not able to run Harmonize flow in Data Hub Framework MarkLogic

I am trying to run Harmonize flow using Gradle in DHF and getting the below error- RESTAPI-SRVEXERR: (err:FOER0000) Extension Error: code: 404 message: Not Found document: The requested flow was not found 2018-06-29 11:57:22.627 Notice: in…
Shalini
  • 348
  • 1
  • 12
2
votes
2 answers

Is it possible to use ml-gradle on MarkLogic 9 without the Admin role?

I am working with ml-gradle on MarkLogic 9 but would like to configure the MarkLogic account running ml-gradle with the principle of least-privilege. Is it possible to configure the ml-gradle user in MarkLogic to have more granular permissions, or…
dan
  • 131
  • 3
2
votes
1 answer

ml-gradle xsd for metadata for services

I am deploying my resource extensions using ML-Gradle. I want to specify the parameter types and cardinality. What is the format of the metadata.xml for a given marklogic resource service extension ? Is there a documentation or an xsd that I can use…
Ravi
  • 1,179
  • 6
  • 13
1
vote
0 answers

ml-gradle range-path-index with path-namespace

I use ml-gradle to define my database. I want to use a path-range-index with namespace on elements and attributes. All works well when I define the path namespace in the admin console, but the path-namespace aren't created when I configure it in the…
1
vote
1 answer

How to create custom REST endpoint via mlgradle?

I want to create custom REST endpoint in MarkLogic, like "http://localhost:port/v1/resources/my_custom_endpoint" And I am doing it via curl command in my local. But I want to integrate this with ml-gradle to automate this process as first install…
anuj_gupta
  • 131
  • 4
1
vote
1 answer

how to create xdbc server using mlgradle in Marklogic?

I am trying create xdbc server using mlgradle. It does for REST/http server but not getting options for xdbc. mlAppName=test-app mlHost=localhost mlUsername=admin mlPassword=test mlRestPort=8007 mlXdbcport=8009 Please let me know how to do it?
anuj_gupta
  • 131
  • 4
1
vote
0 answers

401 Unauthorized while resolving gradle dependencies

Suddenly I have started getting the below error. > Could not resolve all artifacts for configuration ':classpath'. > Could not resolve org.apache.xerces:xercesImpl:2.9.1. Required by: project : >…
Dixit Singla
  • 2,540
  • 3
  • 24
  • 39
1
vote
1 answer

How to manage forest creation in an AWS MarkLogic Managed Cluster

I am working with a MarkLogic managed cluster in AWS and configuring database and forest layout using properties instead of manually configuring the forest placement as in my on premise clusters. I have noticed a few things and am wondering if it is…
H. Garrow
  • 75
  • 4
1
vote
1 answer

Use HTTPS to connect to MarkLogic host from ml-gradle

How do I force ml-gradle to use HTTPS instead of HTTP to connect to a MarkLogic host? I have something like following in my gradle.properties file: mlHost=abc.xyz.aws.private mlDeploy task calls the host using HTTP like…
1
vote
1 answer

Getting "error TS2307: Cannot find module" when deploynig code using ml-gradle

When I trying to deploying the code on ml server(10.0-9.4) ,with below build.gradle file , we are getting the below mentioned error: In this deployment, I want to avoid the loading of ts(src/test/rule10.test.ts) file , is there any way to do so as…
ravvi
  • 117
  • 6
1
vote
0 answers

mlLoadModules - connect timed out

I am getting java.net.SocketTimeoutException when running mlLoadModules to one ML Cluster in Azure, which is created from Marklogic Azure marketplace official image (MarkLogic Multi-Model Database: Enterprise Edition v.10). Below is the error…