Skip to content

Commit 737d65f

Browse files
committed
#408 mlLoadModules now executes all module commands
Makes life easier for DHF to add its own commands for loading modules
1 parent fd11197 commit 737d65f

File tree

2 files changed

+4
-28
lines changed

2 files changed

+4
-28
lines changed

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
group=com.marklogic
2-
version=3.10.0
2+
version=3.10.1
33
javadocsDir=../gh-pages-marklogic-java/javadocs
44

5-
mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.10.0
5+
mlAppDeployerDependency=com.marklogic:ml-app-deployer:3.10.1
66
mlcpUtilDependency=com.marklogic:mlcp-util:0.9.0
77
mlDataMovementDependency=com.marklogic:marklogic-data-movement-components:1.1
88
mlUnitTestDependency=com.marklogic:marklogic-unit-test-client:0.12.0
Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,12 @@
11
package com.marklogic.gradle.task.client
22

3-
import com.marklogic.appdeployer.command.modules.DeleteTestModulesCommand
4-
import org.gradle.api.tasks.TaskAction
5-
6-
import com.marklogic.appdeployer.AppDeployer
7-
import com.marklogic.appdeployer.command.modules.LoadModulesCommand
8-
import com.marklogic.appdeployer.impl.SimpleAppDeployer
93
import com.marklogic.gradle.task.MarkLogicTask
4+
import org.gradle.api.tasks.TaskAction
105

116
class LoadModulesTask extends MarkLogicTask {
127

138
@TaskAction
149
void loadModules() {
15-
LoadModulesCommand command = null
16-
DeleteTestModulesCommand deleteCommand = null
17-
18-
// Check for a LoadModulesCommand in the AppDeployer first, as that may have additional configuration that we
19-
// don't want to have to duplicate on this task
20-
AppDeployer d = getAppDeployer()
21-
if (d instanceof SimpleAppDeployer) {
22-
command = d.getCommand("LoadModulesCommand")
23-
deleteCommand = d.getCommand("DeleteTestModulesCommand")
24-
}
25-
26-
if (command == null) {
27-
command = new LoadModulesCommand()
28-
}
29-
if (deleteCommand == null) {
30-
deleteCommand = new DeleteTestModulesCommand()
31-
}
32-
33-
command.execute(getCommandContext())
34-
deleteCommand.execute(getCommandContext())
10+
deployWithCommandListProperty("mlModuleCommands")
3511
}
3612
}

0 commit comments

Comments
 (0)