Set Up Gradle for Different Environments

You can set up the MarkLogic Server and Data Hub in multiple environments (e.g., development, QA, production, local). Before running ml-gradle tasks for a specific environment, you must set up a properties file for that environment.

Before you begin

You need:


  1. Create a properties file with a filename in the format, where env is the environment the file is intended for.


    • For a development environment, create a file called
    • For a QA environment, create a file called
    • For a production environment, create a file called

    By default, Data Hub uses for your local environment.

  2. Enter the environment-specific property settings inside the appropriate properties file. The contents of these environment files will override any values set in the file.
  3. To specify an environment at runtime, use the -PenvironmentName=xxx option.
    Example: To run a Gradle command against the production (prod) environment,
    ./gradlew taskname ... -PenvironmentName=prod ... -igradlew.bat taskname ... -PenvironmentName=prod ... -i