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

Frequently Asked Questions

Where should I start to learn ml-gradle?

Start with the Getting Started guide mentioned above.

But how does ml-gradle really work?

See How ml-gradle works.

I'm using Roxy; how would I start using ml-gradle?

See Migrating a Roxy project to ml gradle

What are all the different ways to configure ml-gradle?

See Configuring ml-gradle.

What are all the properties that ml-gradle looks for?

See the Property Reference.

How do I override properties for local development or some other environment?

See this project for an example of using the Gradle properties plugin for customizing properties for local development and any other environment.

How are the tokens set in configuration files?

The mlAppConfig.customTokens property in a build.gradle file translates to the customTokens Map on an instance of AppConfig in ml-app-deployer. For more information, see the ml-app-deployer Wiki page.

How do I add a new resource or transform?

See Creating a new resource and Creating a new transform.

How do I add a new set of search options?

You can put a search options file at src/main/ml-modules/options, and when you run "mlLoadModules", ml-gradle will automatically load each XML/JSON file in that directory. Each options file will then be available at /v1/config/query/(name of options file minus extension), as defined in the Client REST API docs. See the Search API docs for instructions on how to create a search options file.

How do I perform a deployment in an environment that doesn't have access to my dependency repositories?

The disconnected-project build file shows a non-ml-gradle-specific way of creating a package that can be used for offline/disconnected deployments that don't depend on any repositories.

Do the names of resource files matter?

For most resources, the names of resource files are used to determine the order in which they're sent to MarkLogic. As of 3.4.0, the exceptions to this are roles and database files. ml-gradle will first load roles without references to other roles (to avoid any errors), and then update every role with its dependent roles. For databases, ml-gradle will sort them based on their dependencies between each other.

How do I extend ml-gradle?

The easiest way to extend what ml-gradle can do is by writing your own commands and writing your own tasks.

Clone this wiki locally