Create Project Using Gradle
Before you begin
You need:
- Java JRE (OpenJDK) 8
- MarkLogic Server (See Version Compatibility.)
- Gradle 6.4 up to the latest 7.x release
Procedure
Results
An example result:
##############################
# Your Data Hub Project is ready.
##############################
- Set username and password
There are several ways to do this. The easiest is to set mlUsername and mlPassword in gradle.properties.
For other approaches see: https://github.com/marklogic/marklogic-data-hub/wiki/Password-Management
- To deploy your application into MarkLogic...
gradle mlDeploy # this will bootstrap your application
gradle mlLoadModules # this will load your custom plugins into MarkLogic
- Full list of gradle tasks:
https://github.com/marklogic/marklogic-data-hub/wiki/Gradle-Tasks
- Curious about the project structure?
Look here: https://github.com/marklogic/marklogic-data-hub/wiki/Project-Directory-Structure
BUILD SUCCESSFUL
Total time: 1.932 secs
What to do next
- Specify the username and password for the Data Hub plugin to use when communicating with MarkLogic Server. See Set the Security Credentials Using Gradle.
- After the project is initialized, all project team members must use the Gradle wrapper in the initialized project to run Gradle tasks. This ensures that everyone uses the same version of Gradle.