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
Create a properties file with a filename in the format gradle-env.properties, where env is the environment the file is intended for.
- For a development environment, create a file called gradle-dev.properties.
- For a QA environment, create a file called gradle-qa.properties.
- For a production environment, create a file called gradle-prod.properties.
By default, Data Hub uses gradle-local.properties for your local environment.
- Enter the environment-specific property settings inside the appropriate properties file. The contents of these environment files will override any values set in the gradle.properties file.
To specify an environment at runtime, use the -PenvironmentName=xxx option.
Example: To run a Gradle command against the production (
./gradlew taskname ... -PenvironmentName=prod ... -i gradlew.bat taskname ... -PenvironmentName=prod ... -i