Skip to content

Commit 955e5e7

Browse files
committed
Added undeploy other servers task to assist with testing undeploying multiple servers
1 parent ef2fa5c commit 955e5e7

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/main/groovy/com/marklogic/gradle/MarkLogicPlugin.groovy

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ import com.marklogic.gradle.task.security.UndeployRolesTask
9090
import com.marklogic.gradle.task.security.UndeploySecurityTask
9191
import com.marklogic.gradle.task.security.UndeployUsersTask
9292
import com.marklogic.gradle.task.servers.DeployServersTask
93+
import com.marklogic.gradle.task.servers.UndeployOtherServersTask
9394
import com.marklogic.gradle.task.tasks.DeleteAllTasksTask
9495
import com.marklogic.gradle.task.tasks.DeployTasksTask
9596
import com.marklogic.gradle.task.tasks.UndeployTasksTask
@@ -182,7 +183,8 @@ class MarkLogicPlugin implements Plugin<Project> {
182183

183184
String serverGroup = "ml-gradle Server"
184185
project.task("mlDeployServers", type: DeployServersTask, group: serverGroup, dependsOn: "mlPrepareRestApiDependencies", description: "Updates the REST API server (if it exists) and deploys each other server, updating it if it exists, in the configuration directory ")
185-
186+
project.task("mlUndeployOtherServers", type: UndeployOtherServersTask, group: serverGroup, description: "Delete any non-REST API servers (e.g. ODBC and XBC servers) defined by server files in the configuration directory")
187+
186188
String securityGroup = "ml-gradle Security"
187189
project.task("mlDeployAmps", type: DeployAmpsTask, group: securityGroup, description: "Deploy each amp, updating it if it exists, in the configuration directory")
188190
project.task("mlDeployCertificateAuthorities", type: DeployCertificateAuthoritiesTask, group: securityGroup, description: "Deploy each certificate authority, updating it if it exists, in the configuration directory")
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package com.marklogic.gradle.task.servers
2+
3+
import org.gradle.api.tasks.TaskAction
4+
5+
import com.marklogic.gradle.task.MarkLogicTask
6+
7+
class UndeployOtherServersTask extends MarkLogicTask {
8+
9+
@TaskAction
10+
void undeployOtherServers() {
11+
undeployWithCommandWithClassName("DeployOtherServersCommand")
12+
}
13+
}

0 commit comments

Comments
 (0)