File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
ml-gradle/src/main/groovy/com/marklogic/gradle/task/client Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,15 @@ class CopySearchOptionsTask extends MarkLogicTask {
1919 @Optional
2020 DatabaseClient client
2121
22+ // Deprecated as it conflicts with the "group" property on a custom task definition.
2223 @Input
23- String group = " Default"
24+ @Optional
25+ @Deprecated (since = " 6.1.0" , forRemoval = true )
26+ String group
27+
28+ @Input
29+ @Optional
30+ String groupName = " Default"
2431
2532 @Input
2633 String sourceServer
@@ -40,8 +47,14 @@ class CopySearchOptionsTask extends MarkLogicTask {
4047 databaseClient = getAppConfig(). newModulesDatabaseClient()
4148 }
4249
43- def script = " declareUpdate();\n const uri = '/${ group} /${ sourceServer} /rest-api/options/${ optionsFilename} ';\n "
44- script + = " xdmp.documentInsert('/${ group} /${ targetServer} /rest-api/options/${ optionsFilename} ', cts.doc(uri), " +
50+ def groupToUse = groupName
51+ if (group != null ) {
52+ logger. warn(" \n The 'group' property is deprecated on the CopySearchOptionsTask task; use 'groupName' instead.\n " )
53+ groupToUse = group
54+ }
55+
56+ def script = " declareUpdate();\n const uri = '/${ groupToUse} /${ sourceServer} /rest-api/options/${ optionsFilename} ';\n "
57+ script + = " xdmp.documentInsert('/${ groupToUse} /${ targetServer} /rest-api/options/${ optionsFilename} ', cts.doc(uri), " +
4558 " xdmp.documentGetPermissions(uri), xdmp.documentGetCollections(uri))" ;
4659 println " Copying search options via:\n " + script
4760 databaseClient. newServerEval(). javascript(script). eval()
You can’t perform that action at this time.
0 commit comments