Skip to content

Commit 3cd7636

Browse files
committed
Added other database example back
1 parent 7fb6761 commit 3cd7636

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/sample-project/build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,22 @@ ext {
154154
//mlAppDeployer.commands.add(new com.marklogic.appdeployer.command.cpf.DeployDefaultPipelinesCommand())
155155
}
156156

157+
/*
158+
* ml-gradle does not blindly process every file in the ml-config/databases directory. It checks for specific files
159+
* for a content database, a schemas database, and a triggers database. There are specific commands for each file, and
160+
* each command provides a number of options for configuring the forests for a database. So to create another database,
161+
* you'll need the block below.
162+
*
163+
* This will be improved in ml-gradle 2.3.1. Supports exists for this in ml-app-deployer already via the
164+
* DeployOtherDatabasesCommand, it's just not part of mlDeploy yet.
165+
*/
166+
ext {
167+
def otherDbCommand = new com.marklogic.appdeployer.command.databases.DeployDatabaseCommand("other-database.json")
168+
mlAppDeployer.commands.add(otherDbCommand)
169+
mlDatabaseCommands.add(otherDbCommand)
170+
}
171+
172+
157173
/*
158174
* Example of a custom command, which in this case performs a merge on a database. The benefit of doing this in a
159175
* command (as opposed to a task) is that a command can be included in the mlDeploy and mlUndeploy tasks by adding it to

0 commit comments

Comments
 (0)